From: Joe Orton Date: Wed, 4 Nov 2009 23:39:57 +0000 (+0000) Subject: * modules/lua/: s/apr_strnatcmp/strcmp/ - strnat*cmp functions are X-Git-Tag: 2.3.3~46 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0aa10f9c58c173b9315f2e156be7f73952d8e502;p=apache * modules/lua/: s/apr_strnatcmp/strcmp/ - strnat*cmp functions are for natural order string sorting. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832910 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/lua/lua_config.c b/modules/lua/lua_config.c index 3beaf91e8a..312cc04d1a 100644 --- a/modules/lua/lua_config.c +++ b/modules/lua/lua_config.c @@ -36,15 +36,15 @@ static cmd_parms *check_cmd_parms(lua_State *L, int index) static int apl_toscope(const char *name) { - if (0 == apr_strnatcmp("once", name)) + if (0 == strcmp("once", name)) return APL_SCOPE_ONCE; - if (0 == apr_strnatcmp("request", name)) + if (0 == strcmp("request", name)) return APL_SCOPE_REQUEST; - if (0 == apr_strnatcmp("connection", name)) + if (0 == strcmp("connection", name)) return APL_SCOPE_CONN; - if (0 == apr_strnatcmp("conn", name)) + if (0 == strcmp("conn", name)) return APL_SCOPE_CONN; - if (0 == apr_strnatcmp("server", name)) + if (0 == strcmp("server", name)) return APL_SCOPE_SERVER; return APL_SCOPE_ONCE; } diff --git a/modules/lua/lua_request.c b/modules/lua/lua_request.c index f589ad7480..2ca29bc1d1 100644 --- a/modules/lua/lua_request.c +++ b/modules/lua/lua_request.c @@ -454,25 +454,25 @@ static int req_newindex(lua_State *L) /* const char* key = luaL_checkstring(L, -2); */ request_rec *r = ap_lua_check_request_rec(L, 1); key = luaL_checkstring(L, 2); - if (0 == apr_strnatcmp("status", key)) { + if (0 == strcmp("status", key)) { int code = luaL_checkinteger(L, 3); r->status = code; return 0; } - if (0 == apr_strnatcmp("content_type", key)) { + if (0 == strcmp("content_type", key)) { const char *value = luaL_checkstring(L, 3); ap_set_content_type(r, apr_pstrdup(r->pool, value)); return 0; } - if (0 == apr_strnatcmp("filename", key)) { + if (0 == strcmp("filename", key)) { const char *value = luaL_checkstring(L, 3); r->filename = apr_pstrdup(r->pool, value); return 0; } - if (0 == apr_strnatcmp("uri", key)) { + if (0 == strcmp("uri", key)) { const char *value = luaL_checkstring(L, 3); r->uri = apr_pstrdup(r->pool, value); return 0; diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c index 73fd9e0bfc..9c97a62587 100644 --- a/modules/lua/mod_lua.c +++ b/modules/lua/mod_lua.c @@ -776,13 +776,13 @@ static const char *register_code_cache(cmd_parms *cmd, void *_cfg, const char *arg) { ap_lua_dir_cfg *cfg = (ap_lua_dir_cfg *) _cfg; - if (apr_strnatcmp("stat", arg) == 0) { + if (strcmp("stat", arg) == 0) { cfg->code_cache_style = APL_CODE_CACHE_STAT; } - else if (apr_strnatcmp("forever", arg) == 0) { + else if (strcmp("forever", arg) == 0) { cfg->code_cache_style = APL_CODE_CACHE_FOREVER; } - else if (apr_strnatcmp("never", arg) == 0) { + else if (strcmp("never", arg) == 0) { cfg->code_cache_style = APL_CODE_CACHE_NEVER; } else { @@ -798,16 +798,16 @@ static const char *register_lua_scope(cmd_parms *cmd, void *_cfg, const char *max) { ap_lua_dir_cfg *cfg = (ap_lua_dir_cfg *) _cfg; - if (apr_strnatcmp("once", scope) == 0) { + if (strcmp("once", scope) == 0) { cfg->vm_scope = APL_SCOPE_ONCE; } - else if (apr_strnatcmp("request", scope) == 0) { + else if (strcmp("request", scope) == 0) { cfg->vm_scope = APL_SCOPE_REQUEST; } - else if (apr_strnatcmp("conn", scope) == 0) { + else if (strcmp("conn", scope) == 0) { cfg->vm_scope = APL_SCOPE_CONN; } - else if (apr_strnatcmp("server", scope) == 0) { + else if (strcmp("server", scope) == 0) { cfg->vm_scope = APL_SCOPE_SERVER; if (min) cfg->vm_server_pool_min = atoi(min);