[gjs] Don't use deprecated JSCLASS_CONSTRUCT_PROTOTYPE flags
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] Don't use deprecated JSCLASS_CONSTRUCT_PROTOTYPE flags
- Date: Tue, 20 Nov 2012 16:25:58 +0000 (UTC)
commit 99ddd290be489b82e33f3d770d73d09cb2b9be9c
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sat Jul 21 18:12:51 2012 +0200
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
gi/boxed.c | 2 +-
gi/function.c | 5 -----
gi/keep-alive.c | 5 -----
gi/ns.c | 5 -----
gi/param.c | 5 -----
gi/repo.c | 5 -----
gi/union.c | 5 -----
gjs/importer.c | 5 -----
modules/dbus-exports.c | 5 -----
9 files changed, 1 insertions(+), 41 deletions(-)
---
diff --git a/gi/boxed.c b/gi/boxed.c
index 381a44f..88a4b80 100644
--- a/gi/boxed.c
+++ b/gi/boxed.c
@@ -1101,7 +1101,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 19dd427..5f8c7f2 100644
--- a/gi/function.c
+++ b/gi/function.c
@@ -1373,11 +1373,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 4ab4b8d..3143d1e 100644
--- a/gi/keep-alive.c
+++ b/gi/keep-alive.c
@@ -166,11 +166,6 @@ keep_alive_trace(JSTracer *tracer,
/* 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 a2fe9bf..28e1d76 100644
--- a/gi/ns.c
+++ b/gi/ns.c
@@ -171,11 +171,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 44e280c..1722c02 100644
--- a/gi/param.c
+++ b/gi/param.c
@@ -425,11 +425,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 3cc9773..4ecdf05 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 c42db62..817ade4 100644
--- a/gi/union.c
+++ b/gi/union.c
@@ -281,11 +281,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 c962fbc..59095c7 100644
--- a/gjs/importer.c
+++ b/gjs/importer.c
@@ -1030,11 +1030,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 b61f250..70fd983 100644
--- a/modules/dbus-exports.c
+++ b/modules/dbus-exports.c
@@ -1788,11 +1788,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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]