]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Fixed mod_lua - 2nd trial.
authorGuenter Knauf <fuankg@apache.org>
Wed, 16 Mar 2011 02:47:58 +0000 (02:47 +0000)
committerGuenter Knauf <fuankg@apache.org>
Wed, 16 Mar 2011 02:47:58 +0000 (02:47 +0000)
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

modules/lua/lua_vmprep.c

index 837680833bf1a65365fb528260b9a5c087ae5d0c..03c26054bfa1886d53bc7ec3aa9fc421c83c1a19 100644 (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);
             }
         }
     }