Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 14691 invoked from network); 21 Dec 2008 21:29:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Dec 2008 21:29:35 -0000 Received: (qmail 24003 invoked by uid 500); 21 Dec 2008 21:29:34 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 23954 invoked by uid 500); 21 Dec 2008 21:29:34 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 23945 invoked by uid 99); 21 Dec 2008 21:29:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Dec 2008 13:29:34 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Dec 2008 21:29:32 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B86262388892; Sun, 21 Dec 2008 13:29:11 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r728509 - in /httpd/httpd/trunk/modules/lua: lua_config.c mod_lua.c Date: Sun, 21 Dec 2008 21:29:11 -0000 To: cvs@httpd.apache.org From: pquerna@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081221212911.B86262388892@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: pquerna Date: Sun Dec 21 13:29:11 2008 New Revision: 728509 URL: http://svn.apache.org/viewvc?rev=728509&view=rev Log: Fixup lua_config.c with prefix rename, and make mod_lua.c so it compiles again. Modified: httpd/httpd/trunk/modules/lua/lua_config.c httpd/httpd/trunk/modules/lua/mod_lua.c Modified: httpd/httpd/trunk/modules/lua/lua_config.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_config.c?rev=728509&r1=728508&r2=728509&view=diff ============================================================================== --- httpd/httpd/trunk/modules/lua/lua_config.c (original) +++ httpd/httpd/trunk/modules/lua/lua_config.c Sun Dec 21 13:29:11 2008 @@ -18,9 +18,9 @@ #include "lua_config.h" #include "lua_vmprep.h" -static apw_dir_cfg* check_dir_config(lua_State* L, int index) { +static apl_dir_cfg* check_dir_config(lua_State* L, int index) { luaL_checkudata(L, index, "Apache2.DirConfig"); - apw_dir_cfg *cfg = (apw_dir_cfg*)lua_unboxpointer(L, index); + apl_dir_cfg *cfg = (apl_dir_cfg*)lua_unboxpointer(L, index); return cfg; } @@ -30,22 +30,22 @@ return cmd; } -static int apw_toscope(const char *name) { - if (0 == apr_strnatcmp("once", name)) return APW_SCOPE_ONCE; - if (0 == apr_strnatcmp("request", name)) return APW_SCOPE_REQUEST; - if (0 == apr_strnatcmp("connection", name)) return APW_SCOPE_CONN; - if (0 == apr_strnatcmp("conn", name)) return APW_SCOPE_CONN; - if (0 == apr_strnatcmp("server", name)) return APW_SCOPE_SERVER; - return APW_SCOPE_ONCE; +static int apl_toscope(const char *name) { + if (0 == apr_strnatcmp("once", name)) return APL_SCOPE_ONCE; + if (0 == apr_strnatcmp("request", name)) return APL_SCOPE_REQUEST; + if (0 == apr_strnatcmp("connection", name)) return APL_SCOPE_CONN; + if (0 == apr_strnatcmp("conn", name)) return APL_SCOPE_CONN; + if (0 == apr_strnatcmp("server", name)) return APL_SCOPE_SERVER; + return APL_SCOPE_ONCE; } -apr_status_t apw_lua_map_handler(apw_dir_cfg *cfg, +apr_status_t apl_lua_map_handler(apl_dir_cfg *cfg, const char *file, const char *function, const char *pattern, const char *scope) { apr_status_t rv; - apw_mapped_handler_spec *handler = apr_palloc(cfg->pool, sizeof(apw_mapped_handler_spec)); + apl_mapped_handler_spec *handler = apr_palloc(cfg->pool, sizeof(apl_mapped_handler_spec)); handler->uri_pattern = NULL; handler->function_name = NULL; @@ -55,17 +55,17 @@ } handler->file_name = apr_pstrdup(cfg->pool, file); handler->uri_pattern = uri_pattern; - handler->scope = apw_toscope(scope); + handler->scope = apl_toscope(scope); handler->function_name = apr_pstrdup(cfg->pool, function); - *(const apw_mapped_handler_spec**)apr_array_push(cfg->mapped_handlers) = handler; + *(const apl_mapped_handler_spec**)apr_array_push(cfg->mapped_handlers) = handler; return APR_SUCCESS; } -/* Change to use apw_lua_map_handler */ +/* Change to use apl_lua_map_handler */ static int cfg_lua_map_handler(lua_State *L) { - apw_dir_cfg *cfg = check_dir_config(L, 1); - apw_mapped_handler_spec *handler = apr_palloc(cfg->pool, sizeof(apw_mapped_handler_spec)); + apl_dir_cfg *cfg = check_dir_config(L, 1); + apl_mapped_handler_spec *handler = apr_palloc(cfg->pool, sizeof(apl_mapped_handler_spec)); handler->uri_pattern = NULL; handler->function_name = NULL; @@ -92,10 +92,10 @@ lua_getfield(L, 2, "scope"); if (lua_isstring(L, -1)) { const char *scope = lua_tostring(L, -1); - handler->scope = apw_toscope(scope); + handler->scope = apl_toscope(scope); } else { - handler->scope = APW_SCOPE_ONCE; + handler->scope = APL_SCOPE_ONCE; } lua_pop(L, 1); @@ -110,18 +110,18 @@ lua_pop(L, 1); - *(const apw_mapped_handler_spec**)apr_array_push(cfg->mapped_handlers) = handler; + *(const apl_mapped_handler_spec**)apr_array_push(cfg->mapped_handlers) = handler; return 0; } static int cfg_directory(lua_State *L) { - apw_dir_cfg *cfg = check_dir_config(L, 1); + apl_dir_cfg *cfg = check_dir_config(L, 1); lua_pushstring(L, cfg->dir); return 1; } /*static int cfg_root(lua_State *L) { - apw_dir_cfg *cfg = check_dir_config(L, 1); + apl_dir_cfg *cfg = check_dir_config(L, 1); lua_pushstring(L, cfg->root_path); return 1; }*/ @@ -180,7 +180,7 @@ {NULL, NULL} }; -void apw_load_config_lmodule(lua_State *L) { +void apl_load_config_lmodule(lua_State *L) { luaL_newmetatable(L, "Apache2.DirConfig"); /* [metatable] */ lua_pushvalue(L, -1); Modified: httpd/httpd/trunk/modules/lua/mod_lua.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.c?rev=728509&r1=728508&r2=728509&view=diff ============================================================================== --- httpd/httpd/trunk/modules/lua/mod_lua.c (original) +++ httpd/httpd/trunk/modules/lua/mod_lua.c Sun Dec 21 13:29:11 2008 @@ -16,12 +16,12 @@ */ #include "mod_lua.h" -#include "config.h" #include #include #include #include "lua_apr.h" +#include "lua_config.h" APR_IMPLEMENT_OPTIONAL_HOOK_RUN_ALL(apl, AP_LUA, int, lua_open, (lua_State *L, apr_pool_t *p),