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:
Oliver Buchtala 2013-09-06 00:40:29 +03:00
commit 29ccb270af
3 changed files with 35 additions and 29 deletions

View file

@ -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;
}