From cbb93c651b7175e1578e6215e5ef091997ab9b3d Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sat, 16 Jun 2012 22:45:33 +0000 Subject: [PATCH] change various strings from char * to const char * git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1351017 13f79535-47bb-0310-9956-ffa450edef68 --- modules/lua/lua_vmprep.h | 6 +++--- modules/lua/mod_lua.c | 4 +++- modules/lua/mod_lua.h | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/lua/lua_vmprep.h b/modules/lua/lua_vmprep.h index be1750df7c..1d3758ca8e 100644 --- a/modules/lua/lua_vmprep.h +++ b/modules/lua/lua_vmprep.h @@ -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; diff --git a/modules/lua/mod_lua.c b/modules/lua/mod_lua.c index 095e54fd86..0598cc6e10 100644 --- a/modules/lua/mod_lua.c +++ b/modules/lua/mod_lua.c @@ -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", diff --git a/modules/lua/mod_lua.h b/modules/lua/mod_lua.h index 5394f7a485..2504b029a7 100644 --- a/modules/lua/mod_lua.h +++ b/modules/lua/mod_lua.h @@ -113,7 +113,7 @@ typedef struct apr_hash_t *hooks; /* */ /* 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; -- 2.49.0