]> granicus.if.org Git - apache/commitdiff
change various strings from char * to const char *
authorStefan Fritsch <sf@apache.org>
Sat, 16 Jun 2012 22:45:33 +0000 (22:45 +0000)
committerStefan Fritsch <sf@apache.org>
Sat, 16 Jun 2012 22:45:33 +0000 (22:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351017 13f79535-47bb-0310-9956-ffa450edef68

modules/lua/lua_vmprep.h
modules/lua/mod_lua.c
modules/lua/mod_lua.h

index be1750df7cd5eb3ddb6e5a0231a796c09a9d51f0..1d3758ca8e70de39ba6e9b35324528df0b34d7c3 100644 (file)
@@ -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;
index 095e54fd861d63ffc4e1d20c2224e620cb7dd8a2..0598cc6e10c51561a5ed79d94ae37b6f24e9d0a3 100644 (file)
@@ -184,6 +184,7 @@ static int lua_request_rec_hook_harness(request_rec *r, const char *name, int ap
     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(request_rec *r, const char *name, int ap
             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",
index 5394f7a48501d621e721d78134a3c3d4f7c3aee4..2504b029a7f719f45a94fa5d288f94754b3adcb6 100644 (file)
@@ -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;