Tuesday, 3 July 2012

Re: JavaScript

Am Dienstag, den 03.07.2012, 20:16 +0200 schrieb "Chris Young"
<chris.young@unsatisfactorysoftware.co.uk>:

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


#define JSAPI_FS(name, nargs, flags) \
- JS_FS(#name, jsapi_native_##name, nargs, flags, 0)
+ JS_FS(#name, jsapi_native_##name, nargs, flags)

That should probably extended into something like that:

#ifdef JS_VERSION <= 150
JS_FS(#name, jsapi_native_##name, nargs, flags, 0)
#else
JS_FS(#name, jsapi_native_##name, nargs, flags)

( it looks like that 1.5 uses the same number of initial values
as versions > 1.8.0 )



#define JSString_to_char(injsstring, outchar, outlen) \
- txt = JS_GetStringBytes(u16_txt); \
+ txt = JS_GetStringBytes(injsstring); \
outlen = strlen(txt)

Confirmed, that part is also required for 1.8.0

Greets,
Ole

No comments:

Post a Comment