summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagna@src.gnome.org>2012-07-21 18:12:51 +0200
committerGiovanni Campagna <gcampagna@src.gnome.org>2012-10-30 17:23:48 +0100
commit7e4513d2108419fa9d347fd91e45d1b8d8f36790 (patch)
tree9b9aa9608e60feb5075da1dd292c41cc86259714
parent10b0818160287ad52a57ac44d731845864e2344c (diff)
downloadgjs-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.c2
-rw-r--r--gi/function.c5
-rw-r--r--gi/keep-alive.c5
-rw-r--r--gi/ns.c5
-rw-r--r--gi/param.c5
-rw-r--r--gi/repo.c5
-rw-r--r--gi/union.c5
-rw-r--r--gjs/importer.c5
-rw-r--r--modules/dbus-exports.c5
9 files changed, 1 insertions, 41 deletions
diff --git a/gi/boxed.c b/gi/boxed.c
index 44b47230..6c681409 100644
--- a/gi/boxed.c
+++ b/gi/boxed.c
@@ -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 */
diff --git a/gi/ns.c b/gi/ns.c
index f5d9c2b5..31cea6de 100644
--- a/gi/ns.c
+++ b/gi/ns.c
@@ -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",
diff --git a/gi/param.c b/gi/param.c
index 63c23d42..0829aadb 100644
--- a/gi/param.c
+++ b/gi/param.c
@@ -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 */
diff --git a/gi/repo.c b/gi/repo.c
index 3cc97735..4ecdf056 100644
--- a/gi/repo.c
+++ b/gi/repo.c
@@ -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 */
diff --git a/gi/union.c b/gi/union.c
index 53ff4681..098070ad 100644
--- a/gi/union.c
+++ b/gi/union.c
@@ -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 */