]> granicus.if.org Git - apache/commitdiff
* modules/lua/: s/apr_strnatcmp/strcmp/ - strnat*cmp functions are
authorJoe Orton <jorton@apache.org>
Wed, 4 Nov 2009 23:39:57 +0000 (23:39 +0000)
committerJoe Orton <jorton@apache.org>
Wed, 4 Nov 2009 23:39:57 +0000 (23:39 +0000)
  for natural order string sorting.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@832910 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_config.c
modules/lua/lua_request.c
modules/lua/mod_lua.c

index 3beaf91e8aedbd4e48cae61b1a11f7a6ecf2dbcf..312cc04d1af8517d52f8f5cbe2e73d4335da1ce9 100644 (file)
@@ -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;
 }
index f589ad7480c9645a0513042426b3223015db9a96..2ca29bc1d1e75f3142ac94480ab5fe4cc59695ed 100644 (file)
@@ -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;
index 73fd9e0bfc5071bb04d5977618d53b01f872867c..9c97a62587a7c3f52d2b85da174a2fc3763aa8ff 100644 (file)
@@ -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);