1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Fixed mod_lua - 2nd trial.

Reverted changed vm_release call from r1082026;
fixed cleanup_lua call.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082033 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Guenter Knauf
2011-03-16 02:47:58 +00:00
parent 6dc7d31f3e
commit 55fdc6fee7

View File

@@ -412,7 +412,7 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
lua_pushlightuserdata(L, L);
lua_pushlightuserdata(L, reslist);
lua_rawset(L,LUA_REGISTRYINDEX);
apr_pool_userdata_set(L, spec->file, &vm_release, lifecycle_pool);
apr_pool_userdata_set(L, spec->file, vm_release, lifecycle_pool);
}
} else {
if (apr_pool_userdata_get((void **)&L, spec->file,
@@ -420,11 +420,12 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
if(L==NULL) {
ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, lifecycle_pool,
"creating lua_State with file %s", spec->file);
"creating lua_State with file %s", spec->file);
/* not available, so create */
if(!vm_construct((void **)&L, spec, lifecycle_pool))
apr_pool_userdata_set(L, spec->file, &cleanup_lua, lifecycle_pool);
apr_pool_userdata_set(L, spec->file, cleanup_lua,
lifecycle_pool);
}
}
}