Commit df6cb07a authored by Guenter Knauf's avatar Guenter Knauf
Browse files

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
parent d33c0e1a
Loading
Loading
Loading
Loading
+3 −2
Changes for modules/lua/lua_vmprep.c: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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,
@@ -424,7 +424,8 @@ AP_LUA_DECLARE(lua_State*)ap_lua_get_lua_state(apr_pool_t *lifecycle_pool,
                /* 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);
            }
        }
    }