Renamed object provided to JS initializers.
JSC initializer create a new module object. V8 initializer fill a provided 'exports' object.
This commit is contained in:
parent
4794fa1884
commit
29ccb270af
3 changed files with 35 additions and 29 deletions
|
|
@ -279,11 +279,9 @@ int $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObjec
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
bool SWIGJSC_INIT (JSGlobalContextRef context) {
|
||||
bool SWIGJSC_INIT (JSGlobalContextRef context, JSObjectRef *exports) {
|
||||
SWIG_InitializeModule(0);
|
||||
|
||||
JSObjectRef global_object = JSContextGetGlobalObject(context);
|
||||
|
||||
/* Initialize the base swig type object */
|
||||
_SwigObject_objectDefinition.staticFunctions = _SwigObject_functions;
|
||||
_SwigObject_objectDefinition.staticValues = _SwigObject_values;
|
||||
|
|
@ -298,6 +296,8 @@ bool SWIGJSC_INIT (JSGlobalContextRef context) {
|
|||
/* Register namespaces */
|
||||
$jsregisternamespaces
|
||||
|
||||
*exports = exports_object;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue