@@ -377,8 +377,8 @@ static JSTDeclareDeleteProperty(jsNativeContainerDelete) {
377377static JSTDeclareGetProperty (jsNativeContainerGet) {
378378 static bool requestInProgress; if (requestInProgress) return NULL ; else requestInProgress = true ;
379379 JSTValue result = NULL ;
380- JSTObject get = (JSTObject) JSTObjectGetProperty (JSTObjectGetConstructor ( object), " get" );
381- if (JSTObjectIsFunction (get)) result = JSTFunctionCall (get, object, JSTStringToValue (propertyName, false ));
380+ JSTObject get = (JSTObject) JSTObjectGetProperty (JSTObjectGetProperty ( JSTObjectGetPrototype ( object), " constructor " ), " get" );
381+ if (JSTValueIsFunction (get)) result = JSTFunctionCall (get, object, JSTStringToValue (propertyName, false ));
382382 requestInProgress = false ; return (JSTValueIsNull (result))?NULL :result;
383383}
384384
@@ -438,12 +438,9 @@ static JSTValue jsNativeContainer JSTDeclareFunction () {
438438 if (JSTObjectHasProperty (definition, " set" )) jsClass.setProperty = &jsNativeContainerSet;
439439 if (JSTObjectHasProperty (definition, " enumerate" )) jsClass.getPropertyNames = &jsNativeContainerEnumerate;
440440 if (JSTObjectHasProperty (definition, " query" )) jsClass.hasProperty = &jsNativeContainerQuery;
441-
442- // The underlying api doesn't work in coregtk-3.0
443- // if (JSTObjectHasProperty(definition, "deallocate")) jsClass.finalize = &jsNativeContainerDeallocate;
444-
445- JSTClass container = JSClassRetain (JSClassCreate (&jsClass)); free (name);
446- return JSTValueFromPointer (container);
441+ // if (JSTObjectHasProperty(definition, "deallocate")) jsClass.finalize = &jsNativeContainerDeallocate;
442+ JSTValue r = JSTValueFromPointer (JSClassRetain (JSClassCreate (&jsClass))); free (name);
443+ return r;
447444
448445}
449446
@@ -452,11 +449,11 @@ static JSTValue jsNativeInstance JSTDeclareFunction() {
452449}
453450
454451static JSTValue jsNativeSetPrototype JSTDeclareFunction () {
455- JSTObjectSetPrototype ((JSTObject)argv[1 ], argv[2 ]); return argv[2 ];
452+ JSTObjectSetPrototype ((JSTObject)argv[0 ], argv[1 ]); return argv[1 ];
456453}
457454
458455static JSTValue jsNativeGetPrototype JSTDeclareFunction () {
459- return (JSTValue) JSTObjectGetPrototype ((JSTObject)argv[1 ]);
456+ return (JSTValue) JSTObjectGetPrototype ((JSTObject)argv[0 ]);
460457}
461458
462459static JSTValue jsNativeSetPrivate JSTDeclareFunction () {
@@ -472,7 +469,7 @@ JSTObject JSTNativeInit_ JSTUtility(JSTObject js) {
472469 JSTObject lib = JSTClassInstance (NULL , NULL );
473470 JSTObjectSetProperty (native, " lib" , lib, JSTObjectPropertyRequired);
474471
475- char * jsNativeTypes = JSTConstructUTF8 (" js.signal = {fpe: %i, ill: %i, segv: %i, bus: %i, abrt: %i, iot: %i, trap: %i, sys: %i, term: %i, int: %i, quit: %i, kill: %i, hup: %i, alrm: %i, vtalrm: %i, prof: %i, io: %i, urg: %i, poll: %i, chld: %i, cld: %i, cont: %i, stop: %i, ttin: %i, ttou: %i, pipe: %i, xcpu: %i, xfsz: %i, usr1: %i, usr2: %i, winch: %i}js.native.alignment = %i; js.native.byteOrder = %i; js.call = {native: %i, ellipsis: %i, x86:{cdecl: %i, win32:{std:%i, fast:{ms: %i, gnu: %i}, 'this':{ms: %i, gnu: %i}}, plan9: %i}, x64:{win64: %i, sysv: %i}, ppc32:{darwin: %i, sysv: %i}, arm:{default: %i, thumb: %i, eabi:{default: %i, thumb: %i}}, mips32:{eabi: %i, o32: %i}, mips64:{n64: %i, n32: %i}}; Object.freeze(js.call); js.type = { 'void': %i, unsigned: %i, pointer: %i, ellipsis: %i, boolean: %i, char: %i, short: %i, int: %i, long: %i, int64: %i, float: %i, double: %i, size: %i, utf8: %i, utf16: %i, utf32: %i, struct: %i, union: %i, value: %i, string: %i};" ,
472+ char * jsNativeTypes = JSTConstructUTF8 (" js.signal = {fpe: %i, ill: %i, segv: %i, bus: %i, abrt: %i, iot: %i, trap: %i, sys: %i, term: %i, int: %i, quit: %i, kill: %i, hup: %i, alrm: %i, vtalrm: %i, prof: %i, io: %i, urg: %i, poll: %i, chld: %i, cld: %i, cont: %i, stop: %i, ttin: %i, ttou: %i, pipe: %i, xcpu: %i, xfsz: %i, usr1: %i, usr2: %i, winch: %i}; js.native.alignment = %i; js.native.byteOrder = %i; js.call = {native: %i, ellipsis: %i, x86:{cdecl: %i, win32:{std:%i, fast:{ms: %i, gnu: %i}, 'this':{ms: %i, gnu: %i}}, plan9: %i}, x64:{win64: %i, sysv: %i}, ppc32:{darwin: %i, sysv: %i}, arm:{default: %i, thumb: %i, eabi:{default: %i, thumb: %i}}, mips32:{eabi: %i, o32: %i}, mips64:{n64: %i, n32: %i}}; Object.freeze(js.call); js.type = { 'void': %i, unsigned: %i, pointer: %i, ellipsis: %i, boolean: %i, char: %i, short: %i, int: %i, long: %i, int64: %i, float: %i, double: %i, size: %i, utf8: %i, utf16: %i, utf32: %i, struct: %i, union: %i, value: %i, string: %i};" ,
476473 SIGFPE, SIGILL, SIGSEGV, SIGBUS, SIGABRT, SIGIOT, SIGTRAP, SIGSYS, SIGTERM, SIGINT, SIGQUIT, SIGKILL, SIGHUP, SIGALRM, SIGVTALRM, SIGPROF, SIGIO, SIGURG, SIGPOLL, SIGCHLD, SIGCLD, SIGCONT, SIGSTOP, SIGTTIN, SIGTTOU, SIGPIPE, SIGXCPU, SIGXFSZ, SIGUSR1, SIGUSR2, SIGWINCH,
477474 JSTNativeAlignment, JSTNativeByteOrder,
478475 0 , DC_CALL_C_ELLIPSIS, DC_CALL_C_X86_CDECL, DC_CALL_C_X86_WIN32_STD,
0 commit comments