httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1351017 - in /httpd/httpd/trunk/modules/lua: lua_vmprep.h mod_lua.c mod_lua.h
Date Sat, 16 Jun 2012 22:45:33 GMT
Author: sf
Date: Sat Jun 16 22:45:33 2012
New Revision: 1351017

URL: http://svn.apache.org/viewvc?rev=1351017&view=rev
Log:
change various strings from char * to const char *

Modified:
    httpd/httpd/trunk/modules/lua/lua_vmprep.h
    httpd/httpd/trunk/modules/lua/mod_lua.c
    httpd/httpd/trunk/modules/lua/mod_lua.h

Modified: httpd/httpd/trunk/modules/lua/lua_vmprep.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/lua_vmprep.h?rev=1351017&r1=1351016&r2=1351017&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/lua_vmprep.h (original)
+++ httpd/httpd/trunk/modules/lua/lua_vmprep.h Sat Jun 16 22:45:33 2012
@@ -54,7 +54,7 @@ typedef struct
     apr_array_header_t *package_cpaths;
 
     /* name of base file to load in the vm */
-    char *file;
+    const char *file;
 
     /* APL_SCOPE_ONCE | APL_SCOPE_REQUEST | APL_SCOPE_CONN | APL_SCOPE_THREAD */
     int scope;
@@ -75,8 +75,8 @@ typedef struct
 
 typedef struct
 {
-    char *function_name;
-    char *file_name;
+    const char *function_name;
+    const char *file_name;
     int scope;
     ap_regex_t *uri_pattern;
     const char *bytecode;

Modified: httpd/httpd/trunk/modules/lua/mod_lua.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.c?rev=1351017&r1=1351016&r2=1351017&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/mod_lua.c (original)
+++ httpd/httpd/trunk/modules/lua/mod_lua.c Sat Jun 16 22:45:33 2012
@@ -184,6 +184,7 @@ static int lua_request_rec_hook_harness(
     if (hook_specs) {
         int i;
         for (i = 0; i < hook_specs->nelts; i++) {
+            char *file;
             ap_lua_mapped_handler_spec *hook_spec =
                 ((ap_lua_mapped_handler_spec **) hook_specs->elts)[i];
 
@@ -202,8 +203,9 @@ static int lua_request_rec_hook_harness(
             spec->cb = &lua_open_callback;
             spec->cb_arg = NULL;
 
-            apr_filepath_merge(&spec->file, server_cfg->root_path,
+            apr_filepath_merge(&file, server_cfg->root_path,
                                spec->file, APR_FILEPATH_NOTRELATIVE, r->pool);
+            spec->file = file;
 
             ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, APLOGNO(01476)
                           "request details scope:%u, filename:%s, function:%s",

Modified: httpd/httpd/trunk/modules/lua/mod_lua.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/lua/mod_lua.h?rev=1351017&r1=1351016&r2=1351017&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/lua/mod_lua.h (original)
+++ httpd/httpd/trunk/modules/lua/mod_lua.h Sat Jun 16 22:45:33 2012
@@ -113,7 +113,7 @@ typedef struct
     apr_hash_t *hooks;          /* <wombat_hook_info> */
 
     /* the actual directory being configured */
-    char *dir;
+    const char *dir;
   
     /* Whether Lua scripts in a sub-dir are run before parents */
     ap_lua_inherit_t inherit;
@@ -131,7 +131,7 @@ typedef struct
 
 typedef struct
 {
-    char *function_name;
+    const char *function_name;
     ap_lua_vm_spec *spec;
 } mapped_request_details;
 
@@ -144,7 +144,7 @@ typedef struct
 typedef struct
 {
     lua_State *L;
-    char *function;
+    const char *function;
 } ap_lua_filter_ctx;
 
 extern module AP_MODULE_DECLARE_DATA lua_module;



Mime
View raw message