summaryrefslogtreecommitdiff
path: root/main/php_variables.c
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-11-02 15:47:02 +0000
committerSascha Schumann <sas@php.net>2000-11-02 15:47:02 +0000
commit43ff395b65234ebc606549720b24387ec5a79d06 (patch)
treee8dc1e802a3fbfca7fea3b38b229dd805eea89ba /main/php_variables.c
parent9866d899e926c971980fd13ccaa9ab5e83f17b90 (diff)
downloadphp-git-43ff395b65234ebc606549720b24387ec5a79d06.tar.gz
Const'ify part of sapi_request_info.
query_string, post_data, path_translated, request_uri, auth_user, auth_password and argv0 are modified, so they cannot become const.
Diffstat (limited to 'main/php_variables.c')
-rw-r--r--main/php_variables.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/main/php_variables.c b/main/php_variables.c
index 4187d00eba..bff78e4a79 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -212,6 +212,7 @@ SAPI_POST_HANDLER_FUNC(php_std_post_handler)
void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC)
{
char *res = NULL, *var, *val;
+ const char *c_var;
pval *array_ptr;
int free_buffer=0;
char *strtok_buf = NULL;
@@ -246,17 +247,17 @@ void php_treat_data(int arg, char *str, zval* destArray ELS_DC PLS_DC SLS_DC)
}
if (arg == PARSE_GET) { /* GET data */
- var = SG(request_info).query_string;
- if (var && *var) {
- res = (char *) estrdup(var);
+ c_var = SG(request_info).query_string;
+ if (c_var && *c_var) {
+ res = (char *) estrdup(c_var);
free_buffer = 1;
} else {
free_buffer = 0;
}
} else if (arg == PARSE_COOKIE) { /* Cookie data */
- var = SG(request_info).cookie_data;
- if (var && *var) {
- res = (char *) estrdup(var);
+ c_var = SG(request_info).cookie_data;
+ if (c_var && *c_var) {
+ res = (char *) estrdup(c_var);
free_buffer = 1;
} else {
free_buffer = 0;