+/**
+ * g_param_spec_ref_sink:
+ * @pspec: a valid #GParamSpec
+ *
+ * Convenience function to ref and sink a #GParamSpec.
+ *
+ * Since: 2.10
+ * Returns: the #GParamSpec that was passed into this function
+ */
+GParamSpec*
+g_param_spec_ref_sink (GParamSpec *pspec)
+{
+ g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
+ g_return_val_if_fail (pspec->ref_count > 0, NULL);
+
+ g_param_spec_ref (pspec);
+ g_param_spec_sink (pspec);
+ return pspec;
+}
+
+/**
+ * g_param_spec_get_name:
+ * @pspec: a valid #GParamSpec
+ *
+ * Get the name of a #GParamSpec.
+ *
+ * Returns: the name of @pspec.
+ */
+G_CONST_RETURN gchar*
+g_param_spec_get_name (GParamSpec *pspec)
+{
+ g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
+
+ return pspec->name;
+}
+
+/**
+ * g_param_spec_get_nick:
+ * @pspec: a valid #GParamSpec
+ *
+ * Get the nickname of a #GParamSpec.
+ *
+ * Returns: the nickname of @pspec.
+ */
+G_CONST_RETURN gchar*
+g_param_spec_get_nick (GParamSpec *pspec)
+{
+ g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
+
+ if (pspec->_nick)
+ return pspec->_nick;
+ else
+ {
+ GParamSpec *redirect_target;
+
+ redirect_target = g_param_spec_get_redirect_target (pspec);
+ if (redirect_target && redirect_target->_nick)
+ return redirect_target->_nick;
+ }
+
+ return pspec->name;
+}
+
+/**
+ * g_param_spec_get_blurb:
+ * @pspec: a valid #GParamSpec
+ *
+ * Get the short description of a #GParamSpec.
+ *
+ * Returns: the short description of @pspec.
+ */
+G_CONST_RETURN gchar*
+g_param_spec_get_blurb (GParamSpec *pspec)
+{
+ g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
+
+ if (pspec->_blurb)
+ return pspec->_blurb;
+ else
+ {
+ GParamSpec *redirect_target;
+
+ redirect_target = g_param_spec_get_redirect_target (pspec);
+ if (redirect_target && redirect_target->_blurb)
+ return redirect_target->_blurb;
+ }
+
+ return NULL;
+}
+
+static void
+canonicalize_key (gchar *key)
+{
+ gchar *p;
+
+ for (p = key; *p != 0; p++)
+ {
+ gchar c = *p;
+
+ if (c != '-' &&
+ (c < '0' || c > '9') &&
+ (c < 'A' || c > 'Z') &&
+ (c < 'a' || c > 'z'))
+ *p = '-';
+ }
+}
+
+static gboolean
+is_canonical (const gchar *key)
+{
+ const gchar *p;
+
+ for (p = key; *p != 0; p++)
+ {
+ gchar c = *p;
+
+ if (c != '-' &&
+ (c < '0' || c > '9') &&
+ (c < 'A' || c > 'Z') &&
+ (c < 'a' || c > 'z'))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
+ * g_param_spec_internal:
+ * @param_type: the #GType for the property; must be derived from #G_TYPE_PARAM
+ * @name: the canonical name of the property
+ * @nick: the nickname of the property
+ * @blurb: a short description of the property
+ * @flags: a combination of #GParamFlags
+ *
+ * Creates a new #GParamSpec instance.
+ *
+ * A property name consists of segments consisting of ASCII letters and
+ * digits, separated by either the '-' or '_' character. The first
+ * character of a property name must be a letter. Names which violate these
+ * rules lead to undefined behaviour.
+ *
+ * When creating and looking up a #GParamSpec, either separator can be used,
+ * but they cannot be mixed. Using '-' is considerably more efficient and in
+ * fact required when using property names as detail strings for signals.
+ *
+ * Beyond the name, #GParamSpec<!-- -->s have two more descriptive strings
+ * associated with them, the @nick, which should be suitable for use as
+ * a label for the property in a property editor, and the @blurb, which should
+ * be a somewhat longer description, suitable for e.g. a tooltip. The @nick
+ * and @blurb should ideally be localized.
+ *
+ * Returns: a newly allocated #GParamSpec instance
+ */