HEX
Server: nginx/1.28.1
System: Linux 10-41-63-61 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64
User: www (1001)
PHP: 7.4.33
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //usr/share/swig4.0/javascript/jsc/javascriptinit.swg
%insert(init) %{
SWIGRUNTIME void
SWIG_JSC_SetModule(JSGlobalContextRef context, swig_module_info *swig_module) {
    JSObjectRef globalObject;
    JSStringRef moduleName;
    JSClassDefinition classDef;
    JSClassRef classRef;
    JSObjectRef object;

    if(context == 0){
        return;
    }

    globalObject = JSContextGetGlobalObject(context);
    moduleName = JSStringCreateWithUTF8CString("swig_module_info_data");

    classDef  = kJSClassDefinitionEmpty;
    classRef = JSClassCreate(&classDef);

    object = JSObjectMake(context, classRef, NULL);
    JSObjectSetPrivate(object, (void*)swig_module);

    JSObjectSetProperty(context, globalObject, moduleName, object, kJSPropertyAttributeNone, NULL);

    JSClassRelease(classRef);
    JSStringRelease(moduleName);
}
SWIGRUNTIME swig_module_info *
SWIG_JSC_GetModule(JSGlobalContextRef context) {
    JSObjectRef globalObject;
    JSStringRef moduleName;
    JSValueRef value;
    JSObjectRef object;

    if(context == 0){
        return 0;
    }

    globalObject = JSContextGetGlobalObject(context);
    moduleName = JSStringCreateWithUTF8CString("swig_module_info_data");

    if(JSObjectHasProperty(context, globalObject, moduleName) == false) {
        JSStringRelease(moduleName);
        return 0;
    }

    value = JSObjectGetProperty(context, globalObject, moduleName, NULL);
    object = JSValueToObject(context, value, NULL);
    JSStringRelease(moduleName);

    return (swig_module_info*)JSObjectGetPrivate(object);
}

#define SWIG_GetModule(clientdata)                SWIG_JSC_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer)       SWIG_JSC_SetModule(clientdata, pointer)
#define SWIG_INIT_CLIENT_DATA_TYPE                JSGlobalContextRef
%}

%insert(init) "swiginit.swg"

%fragment ("js_initializer_define", "templates") %{
#define SWIGJSC_INIT $jsname_initialize
%}

// Open the initializer function
%insert(init)
%{

#ifdef __cplusplus
extern "C" {
#endif

bool SWIGJSC_INIT (JSGlobalContextRef context, JSObjectRef *exports) {
    SWIG_InitializeModule(context);
%}

/* -----------------------------------------------------------------------------
 * js_initializer:  template for the module initializer function
 *   - $jsname:                   module name
 *   - $jscreatenamespaces:       part with code for creating namespace objects
 *   - $jscreateclasses:          part with code for creating classes
 *   - $jsregisternamespaces:     part with code for registration of namespaces
 * ----------------------------------------------------------------------------- */
%fragment ("js_initializer", "templates") %{
    /* Initialize the base swig type object */
    _SwigObject_objectDefinition.staticFunctions = _SwigObject_functions;
    _SwigObject_objectDefinition.staticValues = _SwigObject_values;
    _SwigObject_classRef = JSClassCreate(&_SwigObject_objectDefinition);

    /* Initialize the PackedData class */
    _SwigPackedData_objectDefinition.staticFunctions = _SwigPackedData_functions;
    _SwigPackedData_objectDefinition.staticValues = _SwigPackedData_values;
    _SwigPackedData_objectDefinition.finalize = _wrap_SwigPackedData_delete;
    _SwigPackedData_classRef = JSClassCreate(&_SwigPackedData_objectDefinition);

    /* Create objects for namespaces */
    $jscreatenamespaces

    /* Register classes */
    $jsregisterclasses

    /* Register namespaces */
    $jsregisternamespaces

    *exports = exports_object;

    return true;
}
#ifdef __cplusplus
}
#endif
%}