[gjs] param: It's GObject.ParamSpec, not GLib.ParamSpec
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] param: It's GObject.ParamSpec, not GLib.ParamSpec
- Date: Thu, 15 Dec 2011 22:17:17 +0000 (UTC)
commit d1886776541074b90804d1a47bcb8e2729f9586a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Nov 30 15:45:38 2011 -0500
param: It's GObject.ParamSpec, not GLib.ParamSpec
https://bugzilla.gnome.org/show_bug.cgi?id=665432
gi/ns.c | 38 +++++++++++++++++++-------------------
gi/param.c | 4 ++--
2 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/gi/ns.c b/gi/ns.c
index 25057c0..2108cdd 100644
--- a/gi/ns.c
+++ b/gi/ns.c
@@ -95,32 +95,32 @@ ns_new_resolve(JSContext *context,
JS_BeginRequest(context);
- repo = g_irepository_get_default();
-
- info = g_irepository_find_by_name(repo, priv->namespace, name);
- if (info == NULL) {
- /* Special-case fallback hack for GParamSpec */
- if (strcmp(name, "ParamSpec") == 0 &&
- strcmp(priv->namespace, "GLib") == 0) {
- if (!gjs_define_param_class(context,
- obj,
- NULL)) {
- JS_EndRequest(context);
- goto out;
- } else {
- *objp = obj; /* we defined the property in this object */
- JS_EndRequest(context);
- ret = JS_TRUE;
- goto out;
- }
+ /* Special-case fallback hack for GParamSpec */
+ if (strcmp(name, "ParamSpec") == 0 &&
+ strcmp(priv->namespace, "GObject") == 0) {
+ if (!gjs_define_param_class(context,
+ obj,
+ NULL)) {
+ JS_EndRequest(context);
+ goto out;
} else {
- /* No property defined, but no error either, so return TRUE */
+ *objp = obj; /* we defined the property in this object */
JS_EndRequest(context);
ret = JS_TRUE;
goto out;
}
}
+ repo = g_irepository_get_default();
+
+ info = g_irepository_find_by_name(repo, priv->namespace, name);
+ if (info == NULL) {
+ /* No property defined, but no error either, so return TRUE */
+ JS_EndRequest(context);
+ ret = JS_TRUE;
+ goto out;
+ }
+
gjs_debug(GJS_DEBUG_GNAMESPACE,
"Found info type %s for '%s' in namespace '%s'",
gjs_info_type_name(g_base_info_get_type(info)),
diff --git a/gi/param.c b/gi/param.c
index a4acc18..fa7b5e1 100644
--- a/gi/param.c
+++ b/gi/param.c
@@ -210,7 +210,7 @@ gjs_lookup_param_prototype(JSContext *context)
JSObject *ns;
JSObject *proto;
- ns = gjs_lookup_namespace_object_by_name(context, "GLib");
+ ns = gjs_lookup_namespace_object_by_name(context, "GObject");
if (ns == NULL)
return NULL;
@@ -267,7 +267,7 @@ gjs_define_param_class(JSContext *context,
* Object.prototype
*/
NULL,
- "GLib",
+ "GObject",
constructor_name,
&gjs_param_class,
/* constructor for instances (NULL for
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]