diff options
author | Giovanni Campagna <gcampagna@src.gnome.org> | 2012-07-21 18:12:51 +0200 |
---|---|---|
committer | Giovanni Campagna <gcampagna@src.gnome.org> | 2012-10-30 17:23:48 +0100 |
commit | 7e4513d2108419fa9d347fd91e45d1b8d8f36790 (patch) | |
tree | 9b9aa9608e60feb5075da1dd292c41cc86259714 | |
parent | 10b0818160287ad52a57ac44d731845864e2344c (diff) | |
download | gjs-7e4513d2108419fa9d347fd91e45d1b8d8f36790.tar.gz |
Don't use deprecated JSCLASS_CONSTRUCT_PROTOTYPE flags
Not only that flag is removed in newer versions of libjs, it will
break with the new dynamic class system.
https://bugzilla.gnome.org/show_bug.cgi?id=679688
-rw-r--r-- | gi/boxed.c | 2 | ||||
-rw-r--r-- | gi/function.c | 5 | ||||
-rw-r--r-- | gi/keep-alive.c | 5 | ||||
-rw-r--r-- | gi/ns.c | 5 | ||||
-rw-r--r-- | gi/param.c | 5 | ||||
-rw-r--r-- | gi/repo.c | 5 | ||||
-rw-r--r-- | gi/union.c | 5 | ||||
-rw-r--r-- | gjs/importer.c | 5 | ||||
-rw-r--r-- | modules/dbus-exports.c | 5 |
9 files changed, 1 insertions, 41 deletions
@@ -1103,7 +1103,7 @@ gjs_define_boxed_class(JSContext *context, if (!JSVAL_IS_OBJECT(value)) { gjs_throw(context, "Existing property '%s' does not look like a constructor", - constructor_name); + constructor_name); return JS_FALSE; } diff --git a/gi/function.c b/gi/function.c index efcb2e51..a2437918 100644 --- a/gi/function.c +++ b/gi/function.c @@ -1386,11 +1386,6 @@ function_to_string (JSContext *context, /* The bizarre thing about this vtable is that it applies to both * instances of the object, and to the prototype that instances of the * class have. - * - * Also, there's a constructor field in here, but as far as I can - * tell, it would only be used if no constructor were provided to - * JS_InitClass. The constructor from JS_InitClass is not applied to - * the prototype unless JSCLASS_CONSTRUCT_PROTOTYPE is in flags. */ static struct JSClass gjs_function_class = { "GIRepositoryFunction", /* means "new GIRepositoryFunction()" works */ diff --git a/gi/keep-alive.c b/gi/keep-alive.c index afacf14a..69c15490 100644 --- a/gi/keep-alive.c +++ b/gi/keep-alive.c @@ -236,11 +236,6 @@ print_roots (JSContext *context, /* The bizarre thing about this vtable is that it applies to both * instances of the object, and to the prototype that instances of the * class have. - * - * Also, there's a constructor field in here, but as far as I can - * tell, it would only be used if no constructor were provided to - * JS_InitClass. The constructor from JS_InitClass is not applied to - * the prototype unless JSCLASS_CONSTRUCT_PROTOTYPE is in flags. */ static struct JSClass gjs_keep_alive_class = { "__private_GjsKeepAlive", /* means "new __private_GjsKeepAlive()" works */ @@ -174,11 +174,6 @@ ns_finalize(JSContext *context, /* The bizarre thing about this vtable is that it applies to both * instances of the object, and to the prototype that instances of the * class have. - * - * Also, there's a constructor field in here, but as far as I can - * tell, it would only be used if no constructor were provided to - * JS_InitClass. The constructor from JS_InitClass is not applied to - * the prototype unless JSCLASS_CONSTRUCT_PROTOTYPE is in flags. */ static struct JSClass gjs_ns_class = { "GIRepositoryNamespace", @@ -428,11 +428,6 @@ param_new_internal(JSContext *cx, /* The bizarre thing about this vtable is that it applies to both * instances of the object, and to the prototype that instances of the * class have. - * - * Also, there's a constructor field in here, but as far as I can - * tell, it would only be used if no constructor were provided to - * JS_InitClass. The constructor from JS_InitClass is not applied to - * the prototype unless JSCLASS_CONSTRUCT_PROTOTYPE is in flags. */ static struct JSClass gjs_param_class = { NULL, /* dynamic */ @@ -235,11 +235,6 @@ repo_finalize(JSContext *context, /* The bizarre thing about this vtable is that it applies to both * instances of the object, and to the prototype that instances of the * class have. - * - * Also, there's a constructor field in here, but as far as I can - * tell, it would only be used if no constructor were provided to - * JS_InitClass. The constructor from JS_InitClass is not applied to - * the prototype unless JSCLASS_CONSTRUCT_PROTOTYPE is in flags. */ static struct JSClass gjs_repo_class = { "GIRepository", /* means "new GIRepository()" works */ @@ -284,11 +284,6 @@ union_finalize(JSContext *context, /* The bizarre thing about this vtable is that it applies to both * instances of the object, and to the prototype that instances of the * class have. - * - * Also, there's a constructor field in here, but as far as I can - * tell, it would only be used if no constructor were provided to - * JS_InitClass. The constructor from JS_InitClass is not applied to - * the prototype unless JSCLASS_CONSTRUCT_PROTOTYPE is in flags. */ static struct JSClass gjs_union_class = { NULL, /* dynamic class, no name here */ diff --git a/gjs/importer.c b/gjs/importer.c index a2496f6f..ddbc9850 100644 --- a/gjs/importer.c +++ b/gjs/importer.c @@ -1004,11 +1004,6 @@ importer_finalize(JSContext *context, /* The bizarre thing about this vtable is that it applies to both * instances of the object, and to the prototype that instances of the * class have. - * - * Also, there's a constructor field in here, but as far as I can - * tell, it would only be used if no constructor were provided to - * JS_InitClass. The constructor from JS_InitClass is not applied to - * the prototype unless JSCLASS_CONSTRUCT_PROTOTYPE is in flags. */ static struct JSClass gjs_importer_class = { "GjsFileImporter", diff --git a/modules/dbus-exports.c b/modules/dbus-exports.c index d7ba22eb..a7157717 100644 --- a/modules/dbus-exports.c +++ b/modules/dbus-exports.c @@ -1790,11 +1790,6 @@ exports_finalize(JSContext *context, /* The bizarre thing about this vtable is that it applies to both * instances of the object, and to the prototype that instances of the * class have. - * - * Also, there's a constructor field in here, but as far as I can - * tell, it would only be used if no constructor were provided to - * JS_InitClass. The constructor from JS_InitClass is not applied to - * the prototype unless JSCLASS_CONSTRUCT_PROTOTYPE is in flags. */ static struct JSClass gjs_js_exports_class = { "DBusExports", /* means "new DBusExports()" works */ |