[gjs/wip/gdbus-2: 6/13] Don't use deprecated JSCLASS_CONSTRUCT_PROTOTYPE flags
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/gdbus-2: 6/13] Don't use deprecated JSCLASS_CONSTRUCT_PROTOTYPE flags
- Date: Fri, 2 Nov 2012 13:10:29 +0000 (UTC)
commit 7e4513d2108419fa9d347fd91e45d1b8d8f36790
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 44b4723..6c68140 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 efcb2e5..a243791 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 afacf14..69c1549 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 f5d9c2b..31cea6d 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 63c23d4..0829aad 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 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 53ff468..098070a 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 a2496f6..ddbc985 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 d7ba22e..a715771 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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]