@@ -377,8 +377,8 @@ static JSTDeclareDeleteProperty(jsNativeContainerDelete) {
377
377
static JSTDeclareGetProperty (jsNativeContainerGet) {
378
378
static bool requestInProgress; if (requestInProgress) return NULL ; else requestInProgress = true ;
379
379
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 ));
382
382
requestInProgress = false ; return (JSTValueIsNull (result))?NULL :result;
383
383
}
384
384
@@ -438,12 +438,9 @@ static JSTValue jsNativeContainer JSTDeclareFunction () {
438
438
if (JSTObjectHasProperty (definition, " set" )) jsClass.setProperty = &jsNativeContainerSet;
439
439
if (JSTObjectHasProperty (definition, " enumerate" )) jsClass.getPropertyNames = &jsNativeContainerEnumerate;
440
440
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;
447
444
448
445
}
449
446
@@ -452,11 +449,11 @@ static JSTValue jsNativeInstance JSTDeclareFunction() {
452
449
}
453
450
454
451
static JSTValue jsNativeSetPrototype JSTDeclareFunction () {
455
- JSTObjectSetPrototype ((JSTObject)argv[1 ], argv[2 ]); return argv[2 ];
452
+ JSTObjectSetPrototype ((JSTObject)argv[0 ], argv[1 ]); return argv[1 ];
456
453
}
457
454
458
455
static JSTValue jsNativeGetPrototype JSTDeclareFunction () {
459
- return (JSTValue) JSTObjectGetPrototype ((JSTObject)argv[1 ]);
456
+ return (JSTValue) JSTObjectGetPrototype ((JSTObject)argv[0 ]);
460
457
}
461
458
462
459
static JSTValue jsNativeSetPrivate JSTDeclareFunction () {
@@ -472,7 +469,7 @@ JSTObject JSTNativeInit_ JSTUtility(JSTObject js) {
472
469
JSTObject lib = JSTClassInstance (NULL , NULL );
473
470
JSTObjectSetProperty (native, " lib" , lib, JSTObjectPropertyRequired);
474
471
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};" ,
476
473
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,
477
474
JSTNativeAlignment, JSTNativeByteOrder,
478
475
0 , DC_CALL_C_ELLIPSIS, DC_CALL_C_X86_CDECL, DC_CALL_C_X86_WIN32_STD,
0 commit comments