Loading modules/lua/lua_config.c +2 −2 Original line number Diff line number Diff line Loading @@ -46,8 +46,8 @@ static int apl_toscope(const char *name) return AP_LUA_SCOPE_CONN; if (0 == strcmp("conn", name)) return AP_LUA_SCOPE_CONN; if (0 == strcmp("server", name)) return AP_LUA_SCOPE_SERVER; if (0 == strcmp("thread", name)) return AP_LUA_SCOPE_THREAD; return AP_LUA_SCOPE_ONCE; } Loading modules/lua/lua_vmprep.c +0 −16 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ */ #include "mod_lua.h" #include "http_log.h" #include "apr_reslist.h" #include "apr_uuid.h" #include "lua_config.h" #include "apr_file_info.h" Loading Loading @@ -403,21 +402,6 @@ static apr_status_t vm_destruct(void *vm, void *params, apr_pool_t *pool) return APR_SUCCESS; } static apr_status_t vm_release(void *vm) { apr_reslist_t* reslist; lua_pushlightuserdata(vm,vm); lua_rawget(vm,LUA_REGISTRYINDEX); reslist = (apr_reslist_t*)lua_topointer(vm,-1); return apr_reslist_release(reslist, vm); } static apr_status_t vm_reslist_destroy(void *data) { return apr_reslist_destroy(data); } /** * Function used to create a lua_State instance bound into the web * server in the appropriate scope. Loading modules/lua/lua_vmprep.h +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ #define AP_LUA_SCOPE_ONCE 1 #define AP_LUA_SCOPE_REQUEST 2 #define AP_LUA_SCOPE_CONN 3 #define AP_LUA_SCOPE_SERVER 4 #define AP_LUA_SCOPE_THREAD 4 typedef void (*ap_lua_state_open_callback) (lua_State *L, apr_pool_t *p, Loading @@ -55,7 +55,7 @@ typedef struct /* name of base file to load in the vm */ char *file; /* APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_SERVER */ /* APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_THREAD */ int scope; ap_lua_state_open_callback cb; Loading modules/lua/mod_lua.c +4 −4 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ static int lua_handler(request_rec *r) spec = apr_pcalloc(r->pool, sizeof(ap_lua_vm_spec)); spec->scope = dcfg->vm_scope; spec->pool = spec->scope==AP_LUA_SCOPE_SERVER ? cfg->pool : r->pool; spec->pool = r->pool; spec->file = r->filename; spec->package_paths = cfg->package_paths; spec->package_cpaths = cfg->package_cpaths; Loading Loading @@ -172,7 +172,7 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap spec->scope = hook_spec->scope; spec->bytecode = hook_spec->bytecode; spec->bytecode_len = hook_spec->bytecode_len; spec->pool = spec->scope==AP_LUA_SCOPE_SERVER ? cfg->pool : r->pool; spec->pool = r->pool; spec->package_paths = cfg->package_paths; spec->package_cpaths = cfg->package_cpaths; spec->cb = &lua_open_callback; Loading Loading @@ -836,8 +836,8 @@ static const char *register_lua_scope(cmd_parms *cmd, else if (strcmp("conn", scope) == 0) { cfg->vm_scope = AP_LUA_SCOPE_CONN; } else if (strcmp("server", scope) == 0) { cfg->vm_scope = AP_LUA_SCOPE_SERVER; else if (strcmp("thread", scope) == 0) { cfg->vm_scope = AP_LUA_SCOPE_THREAD; } else { return apr_psprintf(cmd->pool, Loading Loading
modules/lua/lua_config.c +2 −2 Original line number Diff line number Diff line Loading @@ -46,8 +46,8 @@ static int apl_toscope(const char *name) return AP_LUA_SCOPE_CONN; if (0 == strcmp("conn", name)) return AP_LUA_SCOPE_CONN; if (0 == strcmp("server", name)) return AP_LUA_SCOPE_SERVER; if (0 == strcmp("thread", name)) return AP_LUA_SCOPE_THREAD; return AP_LUA_SCOPE_ONCE; } Loading
modules/lua/lua_vmprep.c +0 −16 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ */ #include "mod_lua.h" #include "http_log.h" #include "apr_reslist.h" #include "apr_uuid.h" #include "lua_config.h" #include "apr_file_info.h" Loading Loading @@ -403,21 +402,6 @@ static apr_status_t vm_destruct(void *vm, void *params, apr_pool_t *pool) return APR_SUCCESS; } static apr_status_t vm_release(void *vm) { apr_reslist_t* reslist; lua_pushlightuserdata(vm,vm); lua_rawget(vm,LUA_REGISTRYINDEX); reslist = (apr_reslist_t*)lua_topointer(vm,-1); return apr_reslist_release(reslist, vm); } static apr_status_t vm_reslist_destroy(void *data) { return apr_reslist_destroy(data); } /** * Function used to create a lua_State instance bound into the web * server in the appropriate scope. Loading
modules/lua/lua_vmprep.h +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ #define AP_LUA_SCOPE_ONCE 1 #define AP_LUA_SCOPE_REQUEST 2 #define AP_LUA_SCOPE_CONN 3 #define AP_LUA_SCOPE_SERVER 4 #define AP_LUA_SCOPE_THREAD 4 typedef void (*ap_lua_state_open_callback) (lua_State *L, apr_pool_t *p, Loading @@ -55,7 +55,7 @@ typedef struct /* name of base file to load in the vm */ char *file; /* APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_SERVER */ /* APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_THREAD */ int scope; ap_lua_state_open_callback cb; Loading
modules/lua/mod_lua.c +4 −4 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ static int lua_handler(request_rec *r) spec = apr_pcalloc(r->pool, sizeof(ap_lua_vm_spec)); spec->scope = dcfg->vm_scope; spec->pool = spec->scope==AP_LUA_SCOPE_SERVER ? cfg->pool : r->pool; spec->pool = r->pool; spec->file = r->filename; spec->package_paths = cfg->package_paths; spec->package_cpaths = cfg->package_cpaths; Loading Loading @@ -172,7 +172,7 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap spec->scope = hook_spec->scope; spec->bytecode = hook_spec->bytecode; spec->bytecode_len = hook_spec->bytecode_len; spec->pool = spec->scope==AP_LUA_SCOPE_SERVER ? cfg->pool : r->pool; spec->pool = r->pool; spec->package_paths = cfg->package_paths; spec->package_cpaths = cfg->package_cpaths; spec->cb = &lua_open_callback; Loading Loading @@ -836,8 +836,8 @@ static const char *register_lua_scope(cmd_parms *cmd, else if (strcmp("conn", scope) == 0) { cfg->vm_scope = AP_LUA_SCOPE_CONN; } else if (strcmp("server", scope) == 0) { cfg->vm_scope = AP_LUA_SCOPE_SERVER; else if (strcmp("thread", scope) == 0) { cfg->vm_scope = AP_LUA_SCOPE_THREAD; } else { return apr_psprintf(cmd->pool, Loading