Lib/javascript/jsc/javascriptinit.swg: shortcut JSGlobalContextRef casts.
This commit is contained in:
parent
3edccb615d
commit
0c10c0596f
1 changed files with 6 additions and 11 deletions
|
|
@ -1,19 +1,16 @@
|
||||||
%insert(init) %{
|
%insert(init) %{
|
||||||
SWIGRUNTIME void
|
SWIGRUNTIME void
|
||||||
SWIG_JSC_SetModule(void *clientdata, swig_module_info *swig_module) {
|
SWIG_JSC_SetModule(JSGlobalContextRef context, swig_module_info *swig_module) {
|
||||||
JSGlobalContextRef context;
|
|
||||||
JSObjectRef globalObject;
|
JSObjectRef globalObject;
|
||||||
JSStringRef moduleName;
|
JSStringRef moduleName;
|
||||||
JSClassDefinition classDef;
|
JSClassDefinition classDef;
|
||||||
JSClassRef classRef;
|
JSClassRef classRef;
|
||||||
JSObjectRef object;
|
JSObjectRef object;
|
||||||
|
|
||||||
if(clientdata == 0){
|
if(context == 0){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
context = (JSGlobalContextRef)clientdata;
|
|
||||||
|
|
||||||
globalObject = JSContextGetGlobalObject(context);
|
globalObject = JSContextGetGlobalObject(context);
|
||||||
moduleName = JSStringCreateWithUTF8CString("swig_module_info_data");
|
moduleName = JSStringCreateWithUTF8CString("swig_module_info_data");
|
||||||
|
|
||||||
|
|
@ -29,19 +26,16 @@ SWIG_JSC_SetModule(void *clientdata, swig_module_info *swig_module) {
|
||||||
JSStringRelease(moduleName);
|
JSStringRelease(moduleName);
|
||||||
}
|
}
|
||||||
SWIGRUNTIME swig_module_info *
|
SWIGRUNTIME swig_module_info *
|
||||||
SWIG_JSC_GetModule(void *clientdata) {
|
SWIG_JSC_GetModule(JSGlobalContextRef context) {
|
||||||
JSGlobalContextRef context;
|
|
||||||
JSObjectRef globalObject;
|
JSObjectRef globalObject;
|
||||||
JSStringRef moduleName;
|
JSStringRef moduleName;
|
||||||
JSValueRef value;
|
JSValueRef value;
|
||||||
JSObjectRef object;
|
JSObjectRef object;
|
||||||
|
|
||||||
if(clientdata == 0){
|
if(context == 0){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
context = (JSGlobalContextRef)clientdata;
|
|
||||||
|
|
||||||
globalObject = JSContextGetGlobalObject(context);
|
globalObject = JSContextGetGlobalObject(context);
|
||||||
moduleName = JSStringCreateWithUTF8CString("swig_module_info_data");
|
moduleName = JSStringCreateWithUTF8CString("swig_module_info_data");
|
||||||
|
|
||||||
|
|
@ -59,6 +53,7 @@ SWIG_JSC_GetModule(void *clientdata) {
|
||||||
|
|
||||||
#define SWIG_GetModule(clientdata) SWIG_JSC_GetModule(clientdata)
|
#define SWIG_GetModule(clientdata) SWIG_JSC_GetModule(clientdata)
|
||||||
#define SWIG_SetModule(clientdata, pointer) SWIG_JSC_SetModule(clientdata, pointer)
|
#define SWIG_SetModule(clientdata, pointer) SWIG_JSC_SetModule(clientdata, pointer)
|
||||||
|
#define SWIG_INIT_CLIENT_DATA_TYPE JSGlobalContextRef
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%insert(init) "swiginit.swg"
|
%insert(init) "swiginit.swg"
|
||||||
|
|
@ -76,7 +71,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool SWIGJSC_INIT (JSGlobalContextRef context, JSObjectRef *exports) {
|
bool SWIGJSC_INIT (JSGlobalContextRef context, JSObjectRef *exports) {
|
||||||
SWIG_InitializeModule((void*)context);
|
SWIG_InitializeModule(context);
|
||||||
%}
|
%}
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue