[gjs/wip/js17: 7/14] update for JSClass prototype changes
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/wip/js17: 7/14] update for JSClass prototype changes
- Date: Sun, 24 Mar 2013 13:28:11 +0000 (UTC)
commit 15644bd6f48ddebe0938014571953d37a8fefb76
Author: Tim Lunn <tim feathertop org>
Date: Wed Jan 9 12:00:15 2013 +1100
update for JSClass prototype changes
JS_FinalizeStub no longer exists. JSCLASS_MARK_IS_TRACE flag is no longer required.
JSClass prototype has some changes to the optional members, xdrObject and hasInstance
have been removed, reserved has been moved to the end of the prototype.
https://bugzilla.gnome.org/show_bug.cgi?id=690982
gi/boxed.c | 3 +--
gi/function.c | 3 +--
gi/keep-alive.c | 6 +-----
gi/object.c | 9 +++------
gjs/byteArray.c | 7 +++----
gjs/jsapi-util.c | 2 +-
gjs/jsapi-util.h | 3 +--
7 files changed, 11 insertions(+), 22 deletions(-)
---
diff --git a/gi/boxed.c b/gi/boxed.c
index 265cb2e..570b783 100644
--- a/gi/boxed.c
+++ b/gi/boxed.c
@@ -940,8 +940,7 @@ static struct JSClass gjs_boxed_class = {
boxed_finalize,
NULL,
NULL,
- NULL,
- NULL, NULL, NULL, NULL, NULL
+ NULL, NULL, NULL
};
static JSPropertySpec gjs_boxed_proto_props[] = {
diff --git a/gi/function.c b/gi/function.c
index 8cc6076..0ae2c4c 100644
--- a/gi/function.c
+++ b/gi/function.c
@@ -1366,9 +1366,8 @@ static struct JSClass gjs_function_class = {
JS_ConvertStub,
function_finalize,
NULL,
- NULL,
function_call,
- NULL, NULL, NULL, NULL, NULL
+ NULL, NULL, NULL
};
static JSPropertySpec gjs_function_proto_props[] = {
diff --git a/gi/keep-alive.c b/gi/keep-alive.c
index ce56e35..a8eea22 100644
--- a/gi/keep-alive.c
+++ b/gi/keep-alive.c
@@ -150,7 +150,6 @@ keep_alive_trace(JSTracer *tracer,
*/
static struct JSClass gjs_keep_alive_class = {
"__private_GjsKeepAlive", /* means "new __private_GjsKeepAlive()" works */
- JSCLASS_MARK_IS_TRACE | /* TraceOp not MarkOp */
JSCLASS_HAS_PRIVATE,
JS_PropertyStub,
JS_PropertyStub,
@@ -164,10 +163,7 @@ static struct JSClass gjs_keep_alive_class = {
NULL,
NULL,
NULL,
- NULL,
- NULL,
- JS_CLASS_TRACE(keep_alive_trace),
- NULL
+ keep_alive_trace,
};
static JSPropertySpec gjs_keep_alive_proto_props[] = {
diff --git a/gi/object.c b/gi/object.c
index bcbab0a..1648f73 100644
--- a/gi/object.c
+++ b/gi/object.c
@@ -1436,8 +1436,7 @@ to_string_func(JSContext *context,
static struct JSClass gjs_object_instance_class = {
"GObject_Object",
JSCLASS_HAS_PRIVATE |
- JSCLASS_NEW_RESOLVE |
- JSCLASS_MARK_IS_TRACE,
+ JSCLASS_NEW_RESOLVE,
JS_PropertyStub,
JS_PropertyStub,
object_instance_get_prop,
@@ -1450,10 +1449,8 @@ static struct JSClass gjs_object_instance_class = {
NULL,
NULL,
NULL,
- NULL,
- NULL,
- JS_CLASS_TRACE(object_instance_trace),
- NULL,
+ object_instance_trace,
+
};
static JSBool
diff --git a/gjs/byteArray.c b/gjs/byteArray.c
index 11d03a2..f24a17d 100644
--- a/gjs/byteArray.c
+++ b/gjs/byteArray.c
@@ -65,16 +65,15 @@ static struct JSClass gjs_byte_array_class = {
JSCLASS_NEW_RESOLVE,
JS_PropertyStub,
JS_PropertyStub,
- byte_array_get_prop,
- byte_array_set_prop,
+ (JSPropertyOp)byte_array_get_prop,
+ (JSStrictPropertyOp)byte_array_set_prop,
JS_EnumerateStub,
(JSResolveOp) byte_array_new_resolve, /* cast due to new sig */
JS_ConvertStub,
byte_array_finalize,
NULL,
NULL,
- NULL,
- NULL, NULL, NULL, NULL, NULL
+ NULL, NULL, NULL
};
JSBool
diff --git a/gjs/jsapi-util.c b/gjs/jsapi-util.c
index 5451969..2aa6f06 100644
--- a/gjs/jsapi-util.c
+++ b/gjs/jsapi-util.c
@@ -85,7 +85,7 @@ gjs_runtime_get_context(JSRuntime *runtime)
static JSClass global_class = {
"GjsGlobal", JSCLASS_GLOBAL_FLAGS,
JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_StrictPropertyStub,
- JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub,
+ JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub,
JSCLASS_NO_OPTIONAL_MEMBERS
};
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 19406a8..ce72963 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -145,8 +145,7 @@ static struct JSClass gjs_##cname##_class = { \
gjs_##cname##_finalize, \
NULL, \
NULL, \
- NULL, \
- NULL, NULL, NULL, NULL, NULL \
+ NULL, NULL, NULL \
}; \
jsval gjs_##cname##_create_proto(JSContext *context, JSObject *module, const char *proto_name, JSObject
*parent) \
{ \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]