On 1 Jul 2012 23:34:50 +0100, Chris Young wrote:

> On Mon, 02 Jul 2012 00:01:40 +0200, Ole wrote:
> 
> >  Almost yes, this patch is working for spidermonkey 1.7 and probably 1.8
> >  ( I'm not sure what the other developers think about it? There was no 
> >  comment at all :/)
> 
> Vince has committed a change based on your patch.

There seems to be a couple of minor problems though.  One is that the
JS_FS etc macros aren't in the NetSurf headers (I assume this is
intentional, and they can be easily added to the Spidermonkey includes
in any case)

The others are attached.  I'm not sure if my changes break later
versions, given that I'm still testing on 1.5.

Chris
diff --git a/javascript/jsapi.h b/javascript/jsapi.h
index ac5ada7..2b3637b 100644
--- a/javascript/jsapi.h
+++ b/javascript/jsapi.h
@@ -43,7 +43,7 @@
 
 /* five parameter function descriptor */
 #define JSAPI_FS(name, nargs, flags) \
-       JS_FS(#name, jsapi_native_##name, nargs, flags, 0)
+       JS_FS(#name, jsapi_native_##name, nargs, flags)
 
 /* function descriptor end */
 #define JSAPI_FS_END JS_FS_END
@@ -86,7 +86,7 @@ JS_NewCompartmentAndGlobalObject(JSContext *cx,
 #define JS_StrictPropertyStub JS_PropertyStub
 
 #define JSString_to_char(injsstring, outchar, outlen)  \
-       txt = JS_GetStringBytes(u16_txt);               \
+       txt = JS_GetStringBytes(injsstring);            \
        outlen = strlen(txt)
 
 #else /* #if JS_VERSION <= 180 */

Reply via email to