Generate defines for initializer function.
This commit is contained in:
parent
be06ceea26
commit
2c4a90a37d
2 changed files with 9 additions and 2 deletions
|
|
@ -244,6 +244,10 @@ int $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObjec
|
|||
}
|
||||
%}
|
||||
|
||||
%fragment ("js_initializer_define", "templates") %{
|
||||
#define SWIGJSC_INIT $jsname_initialize
|
||||
%}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* js_initializer: template for the module initializer function
|
||||
* - $jsname: module name
|
||||
|
|
@ -256,7 +260,7 @@ int $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObjec
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
bool $jsname_initialize(JSGlobalContextRef context) {
|
||||
bool SWIGJSC_INIT (JSGlobalContextRef context) {
|
||||
SWIG_InitializeModule(0);
|
||||
|
||||
JSObjectRef global_object = JSContextGetGlobalObject(context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue