netsurf: branch master updated. 966fb9f215915567d44cff97a73cf3730dd8c431

NetSurf Browser Project (Commit Mailer) no-reply at netsurf-browser.org
Thu Nov 22 16:49:45 GMT 2012


Gitweb links:

...log http://git.netsurf-browser.org/netsurf.git/shortlog/966fb9f215915567d44cff97a73cf3730dd8c431
...commit http://git.netsurf-browser.org/netsurf.git/commit/966fb9f215915567d44cff97a73cf3730dd8c431
...tree http://git.netsurf-browser.org/netsurf.git/tree/966fb9f215915567d44cff97a73cf3730dd8c431

The branch, master has been updated
       via  966fb9f215915567d44cff97a73cf3730dd8c431 (commit)
      from  054984099fd8867da92fa685dce728e1cc665fd0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commitdiff/966fb9f215915567d44cff97a73cf3730dd8c431
commit 966fb9f215915567d44cff97a73cf3730dd8c431
Author: Vincent Sanders <vince at netsurf-browser.org>
Commit: Vincent Sanders <vince at netsurf-browser.org>

    rationalise the JSAPI macro usage requires nsgenbind changes

diff --git a/javascript/jsapi.h b/javascript/jsapi.h
index c100291..718dd20 100644
--- a/javascript/jsapi.h
+++ b/javascript/jsapi.h
@@ -47,24 +47,24 @@
  */
 
 /* native function definition with five parameters */
-#define JSAPI_NATIVE(name, cx, argc, vp) \
-	jsapi_native_##name(cx, JSObject *jsapi_this, argc, vp, jsval *jsapi_rval)
+#define JSAPI_FUNC(name, cx, argc, vp) \
+	jsapi_func_##name(cx, JSObject *jsapi_this, argc, vp, jsval *jsapi_rval)
 
-/* native function return value */
-#define JSAPI_RVAL(cx, vp) (jsapi_rval)
+/* native function return value - No macro available */
+#define JSAPI_FUNC_RVAL(cx, vp) (jsapi_rval)
 
-/* native function return value setter with no JS_SET_RVAL */
-#define JSAPI_SET_RVAL(cx, vp, v) (*jsapi_rval = (v))
+/* native function return value setter - No macro available  */
+#define JSAPI_FUNC_SET_RVAL(cx, vp, v) (*jsapi_rval = (v))
 
 /* arguments */
-#define JSAPI_ARGV(cx, vp) (vp)
+#define JSAPI_FUNC_ARGV(cx, vp) (vp)
 
 /* check if a jsval is an object */
 #define JSAPI_JSVAL_IS_OBJECT(v) JSVAL_IS_OBJECT(v)
 
 /* native function specifier with five parameters and no JS_FS macro */
 #define JSAPI_FS(name, nargs, flags) \
-	{ #name, jsapi_native_##name, nargs, flags, 0 }
+	{ #name, jsapi_func_##name, nargs, flags, 0 }
 
 /* native function specifier list end */
 #define JSAPI_FS_END { NULL, NULL, 0, 0, 0 }
@@ -73,13 +73,16 @@
 
 
 /* native proprty definition */
-#define JSAPI_PROPERTYGET(name, cx, obj, vp) \
+#define JSAPI_PROP_GETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_get(cx, obj, jsval id, vp)
-#define JSAPI_PROPERTYSET(name, cx, obj, vp) \
+#define JSAPI_PROP_SETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_set(cx, obj, jsval id, vp)
 
+/* native property return value */
+#define JSAPI_PROP_RVAL(cx, vp) (vp)
+
 /* native property getter return value */
-#define JS_SET_RVAL(cx, vp, v) (*(vp) = (v))
+#define JSAPI_PROP_SET_RVAL(cx, vp, v) (*(vp) = (v))
 
 /* native property specifier */
 #define JSAPI_PS(name, fnname, tinyid, flags)				\
@@ -155,12 +158,12 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
  */
 
 /* five parameter jsapi native call */
-#define JSAPI_NATIVE(name, cx, argc, vp) \
-	jsapi_native_##name(cx, JSObject *jsapi_this, argc, vp, jsval *jsapi_rval)
+#define JSAPI_FUNC(name, cx, argc, vp) \
+	jsapi_func_##name(cx, JSObject *jsapi_this, argc, vp, jsval *jsapi_rval)
 
 /* five parameter function descriptor */
 #define JSAPI_FS(name, nargs, flags) \
-	JS_FS(#name, jsapi_native_##name, nargs, flags, 0)
+	JS_FS(#name, jsapi_func_##name, nargs, flags, 0)
 
 /* function descriptor end */
 #define JSAPI_FS_END JS_FS_END
@@ -169,10 +172,10 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
 #define JSAPI_RVAL(cx, vp) JS_RVAL(cx, jsapi_rval)
 
 /* return value setter */
-#define JSAPI_SET_RVAL(cx, vp, v) JS_SET_RVAL(cx, jsapi_rval, v)
+#define JSAPI_FUNC_SET_RVAL(cx, vp, v) JS_SET_RVAL(cx, jsapi_rval, v)
 
 /* arguments */
-#define JSAPI_ARGV(cx, vp) (vp)
+#define JSAPI_FUNC_ARGV(cx, vp) (vp)
 
 /* check if a jsval is an object */
 #define JSAPI_JSVAL_IS_OBJECT(v) JSVAL_IS_OBJECT(v)
@@ -181,11 +184,17 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
 #define JSAPI_THIS_OBJECT(cx,vp) jsapi_this
 
 /* proprty native calls */
-#define JSAPI_PROPERTYGET(name, cx, obj, vp) \
+#define JSAPI_PROP_GETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_get(cx, obj, jsval id, vp)
-#define JSAPI_PROPERTYSET(name, cx, obj, vp) \
+#define JSAPI_PROP_SETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_set(cx, obj, jsval id, vp)
 
+/* native property return value */
+#define JSAPI_PROP_RVAL JS_RVAL
+
+/* native property return value setter */
+#define JSAPI_PROP_SET_RVAL JS_SET_RVAL
+
 /* property specifier */
 #define JSAPI_PS(name, fnname, tinyid, flags)				\
 	{ name , tinyid , flags , jsapi_property_##fnname##_get , jsapi_property_##fnname##_set }
@@ -248,11 +257,11 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
 /************************** Spidermonkey 1.8.5 **************************/
 
 /* three parameter jsapi native call */
-#define JSAPI_NATIVE(name, cx, argc, vp) jsapi_native_##name(cx, argc, vp)
+#define JSAPI_FUNC(name, cx, argc, vp) jsapi_func_##name(cx, argc, vp)
 
 /* three parameter function descriptor */
 #define JSAPI_FS(name, nargs, flags) \
-	JS_FS(#name, jsapi_native_##name, nargs, flags)
+	JS_FS(#name, jsapi_func_##name, nargs, flags)
 
 /* function descriptor end */
 #define JSAPI_FS_END JS_FS_END
@@ -261,10 +270,10 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
 #define JSAPI_RVAL JS_RVAL
 
 /* return value setter */
-#define JSAPI_SET_RVAL JS_SET_RVAL
+#define JSAPI_FUNC_SET_RVAL JS_SET_RVAL
 
 /* arguments */
-#define JSAPI_ARGV(cx, vp) JS_ARGV(cx,vp)
+#define JSAPI_FUNC_ARGV(cx, vp) JS_ARGV(cx,vp)
 
 /* check if a jsval is an object */
 #define JSAPI_JSVAL_IS_OBJECT(v) JSVAL_IS_OBJECT(v)
@@ -278,11 +287,17 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
 #define JSAPI_THIS_OBJECT(cx,vp) JS_THIS_OBJECT(cx,vp)
 
 /* proprty native calls */
-#define JSAPI_PROPERTYGET(name, cx, obj, vp) \
+#define JSAPI_PROP_GETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_get(cx, obj, jsid id, vp)
-#define JSAPI_PROPERTYSET(name, cx, obj, vp) \
+#define JSAPI_PROP_SETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_set(cx, obj, jsid id, JSBool strict, vp)
 
+/* native property return value */
+#define JSAPI_PROP_RVAL JS_RVAL
+
+/* native property getter return value */
+#define JSAPI_PROP_SET_RVAL JS_SET_RVAL
+
 /* property specifier */
 #define JSAPI_PS(name, fnname, tinyid, flags) {			\
 		name,						\


-----------------------------------------------------------------------

Summary of changes:
 javascript/jsapi.h |   63 ++++++++++++++++++++++++++++++++-------------------
 1 files changed, 39 insertions(+), 24 deletions(-)

diff --git a/javascript/jsapi.h b/javascript/jsapi.h
index c100291..718dd20 100644
--- a/javascript/jsapi.h
+++ b/javascript/jsapi.h
@@ -47,24 +47,24 @@
  */
 
 /* native function definition with five parameters */
-#define JSAPI_NATIVE(name, cx, argc, vp) \
-	jsapi_native_##name(cx, JSObject *jsapi_this, argc, vp, jsval *jsapi_rval)
+#define JSAPI_FUNC(name, cx, argc, vp) \
+	jsapi_func_##name(cx, JSObject *jsapi_this, argc, vp, jsval *jsapi_rval)
 
-/* native function return value */
-#define JSAPI_RVAL(cx, vp) (jsapi_rval)
+/* native function return value - No macro available */
+#define JSAPI_FUNC_RVAL(cx, vp) (jsapi_rval)
 
-/* native function return value setter with no JS_SET_RVAL */
-#define JSAPI_SET_RVAL(cx, vp, v) (*jsapi_rval = (v))
+/* native function return value setter - No macro available  */
+#define JSAPI_FUNC_SET_RVAL(cx, vp, v) (*jsapi_rval = (v))
 
 /* arguments */
-#define JSAPI_ARGV(cx, vp) (vp)
+#define JSAPI_FUNC_ARGV(cx, vp) (vp)
 
 /* check if a jsval is an object */
 #define JSAPI_JSVAL_IS_OBJECT(v) JSVAL_IS_OBJECT(v)
 
 /* native function specifier with five parameters and no JS_FS macro */
 #define JSAPI_FS(name, nargs, flags) \
-	{ #name, jsapi_native_##name, nargs, flags, 0 }
+	{ #name, jsapi_func_##name, nargs, flags, 0 }
 
 /* native function specifier list end */
 #define JSAPI_FS_END { NULL, NULL, 0, 0, 0 }
@@ -73,13 +73,16 @@
 
 
 /* native proprty definition */
-#define JSAPI_PROPERTYGET(name, cx, obj, vp) \
+#define JSAPI_PROP_GETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_get(cx, obj, jsval id, vp)
-#define JSAPI_PROPERTYSET(name, cx, obj, vp) \
+#define JSAPI_PROP_SETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_set(cx, obj, jsval id, vp)
 
+/* native property return value */
+#define JSAPI_PROP_RVAL(cx, vp) (vp)
+
 /* native property getter return value */
-#define JS_SET_RVAL(cx, vp, v) (*(vp) = (v))
+#define JSAPI_PROP_SET_RVAL(cx, vp, v) (*(vp) = (v))
 
 /* native property specifier */
 #define JSAPI_PS(name, fnname, tinyid, flags)				\
@@ -155,12 +158,12 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
  */
 
 /* five parameter jsapi native call */
-#define JSAPI_NATIVE(name, cx, argc, vp) \
-	jsapi_native_##name(cx, JSObject *jsapi_this, argc, vp, jsval *jsapi_rval)
+#define JSAPI_FUNC(name, cx, argc, vp) \
+	jsapi_func_##name(cx, JSObject *jsapi_this, argc, vp, jsval *jsapi_rval)
 
 /* five parameter function descriptor */
 #define JSAPI_FS(name, nargs, flags) \
-	JS_FS(#name, jsapi_native_##name, nargs, flags, 0)
+	JS_FS(#name, jsapi_func_##name, nargs, flags, 0)
 
 /* function descriptor end */
 #define JSAPI_FS_END JS_FS_END
@@ -169,10 +172,10 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
 #define JSAPI_RVAL(cx, vp) JS_RVAL(cx, jsapi_rval)
 
 /* return value setter */
-#define JSAPI_SET_RVAL(cx, vp, v) JS_SET_RVAL(cx, jsapi_rval, v)
+#define JSAPI_FUNC_SET_RVAL(cx, vp, v) JS_SET_RVAL(cx, jsapi_rval, v)
 
 /* arguments */
-#define JSAPI_ARGV(cx, vp) (vp)
+#define JSAPI_FUNC_ARGV(cx, vp) (vp)
 
 /* check if a jsval is an object */
 #define JSAPI_JSVAL_IS_OBJECT(v) JSVAL_IS_OBJECT(v)
@@ -181,11 +184,17 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
 #define JSAPI_THIS_OBJECT(cx,vp) jsapi_this
 
 /* proprty native calls */
-#define JSAPI_PROPERTYGET(name, cx, obj, vp) \
+#define JSAPI_PROP_GETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_get(cx, obj, jsval id, vp)
-#define JSAPI_PROPERTYSET(name, cx, obj, vp) \
+#define JSAPI_PROP_SETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_set(cx, obj, jsval id, vp)
 
+/* native property return value */
+#define JSAPI_PROP_RVAL JS_RVAL
+
+/* native property return value setter */
+#define JSAPI_PROP_SET_RVAL JS_SET_RVAL
+
 /* property specifier */
 #define JSAPI_PS(name, fnname, tinyid, flags)				\
 	{ name , tinyid , flags , jsapi_property_##fnname##_get , jsapi_property_##fnname##_set }
@@ -248,11 +257,11 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
 /************************** Spidermonkey 1.8.5 **************************/
 
 /* three parameter jsapi native call */
-#define JSAPI_NATIVE(name, cx, argc, vp) jsapi_native_##name(cx, argc, vp)
+#define JSAPI_FUNC(name, cx, argc, vp) jsapi_func_##name(cx, argc, vp)
 
 /* three parameter function descriptor */
 #define JSAPI_FS(name, nargs, flags) \
-	JS_FS(#name, jsapi_native_##name, nargs, flags)
+	JS_FS(#name, jsapi_func_##name, nargs, flags)
 
 /* function descriptor end */
 #define JSAPI_FS_END JS_FS_END
@@ -261,10 +270,10 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
 #define JSAPI_RVAL JS_RVAL
 
 /* return value setter */
-#define JSAPI_SET_RVAL JS_SET_RVAL
+#define JSAPI_FUNC_SET_RVAL JS_SET_RVAL
 
 /* arguments */
-#define JSAPI_ARGV(cx, vp) JS_ARGV(cx,vp)
+#define JSAPI_FUNC_ARGV(cx, vp) JS_ARGV(cx,vp)
 
 /* check if a jsval is an object */
 #define JSAPI_JSVAL_IS_OBJECT(v) JSVAL_IS_OBJECT(v)
@@ -278,11 +287,17 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
 #define JSAPI_THIS_OBJECT(cx,vp) JS_THIS_OBJECT(cx,vp)
 
 /* proprty native calls */
-#define JSAPI_PROPERTYGET(name, cx, obj, vp) \
+#define JSAPI_PROP_GETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_get(cx, obj, jsid id, vp)
-#define JSAPI_PROPERTYSET(name, cx, obj, vp) \
+#define JSAPI_PROP_SETTER(name, cx, obj, vp) \
 	jsapi_property_##name##_set(cx, obj, jsid id, JSBool strict, vp)
 
+/* native property return value */
+#define JSAPI_PROP_RVAL JS_RVAL
+
+/* native property getter return value */
+#define JSAPI_PROP_SET_RVAL JS_SET_RVAL
+
 /* property specifier */
 #define JSAPI_PS(name, fnname, tinyid, flags) {			\
 		name,						\


-- 
NetSurf Browser



More information about the netsurf-commits mailing list