summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
Diffstat (limited to 'sapi')
-rw-r--r--sapi/aolserver/aolserver.c2
-rw-r--r--sapi/apache/php_apache.c30
-rw-r--r--sapi/apache2filter/php_functions.c10
-rw-r--r--sapi/apache2handler/php_functions.c10
-rw-r--r--sapi/apache_hooks/php_apache.c28
-rw-r--r--sapi/cgi/cgi_main.c6
-rw-r--r--sapi/cli/php_cli_server.c4
-rw-r--r--sapi/litespeed/lsapi_main.c12
-rw-r--r--sapi/milter/php_milter.c4
-rw-r--r--sapi/nsapi/nsapi.c4
-rw-r--r--sapi/phpdbg/phpdbg_prompt.c2
11 files changed, 56 insertions, 56 deletions
diff --git a/sapi/aolserver/aolserver.c b/sapi/aolserver/aolserver.c
index a89b98e57a..13091b908a 100644
--- a/sapi/aolserver/aolserver.c
+++ b/sapi/aolserver/aolserver.c
@@ -273,7 +273,7 @@ PHP_FUNCTION(getallheaders)
char *key = Ns_SetKey(NSG(conn->headers), i);
char *value = Ns_SetValue(NSG(conn->headers), i);
- add_assoc_string(return_value, key, value, 1);
+ add_assoc_string(return_value, key, value);
}
}
diff --git a/sapi/apache/php_apache.c b/sapi/apache/php_apache.c
index 43a4c90efe..1ad4897a35 100644
--- a/sapi/apache/php_apache.c
+++ b/sapi/apache/php_apache.c
@@ -404,7 +404,7 @@ PHP_FUNCTION(apache_request_headers)
if (!tenv[i].key) {
continue;
}
- if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) {
+ if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val)==FAILURE) {
RETURN_FALSE;
}
}
@@ -424,7 +424,7 @@ PHP_FUNCTION(apache_response_headers)
tenv = (table_entry *)env_arr->elts;
for (i = 0; i < env_arr->nelts; ++i) {
if (!tenv[i].key) continue;
- if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) {
+ if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val)==FAILURE) {
RETURN_FALSE;
}
}
@@ -475,34 +475,34 @@ PHP_FUNCTION(apache_lookup_uri)
add_property_long(return_value,"status", rr->status);
if (rr->the_request) {
- add_property_string(return_value,"the_request", rr->the_request, 1);
+ add_property_string(return_value,"the_request", rr->the_request);
}
if (rr->status_line) {
- add_property_string(return_value,"status_line", (char *)rr->status_line, 1);
+ add_property_string(return_value,"status_line", (char *)rr->status_line);
}
if (rr->method) {
- add_property_string(return_value,"method", (char *)rr->method, 1);
+ add_property_string(return_value,"method", (char *)rr->method);
}
if (rr->content_type) {
- add_property_string(return_value,"content_type", (char *)rr->content_type, 1);
+ add_property_string(return_value,"content_type", (char *)rr->content_type);
}
if (rr->handler) {
- add_property_string(return_value,"handler", (char *)rr->handler, 1);
+ add_property_string(return_value,"handler", (char *)rr->handler);
}
if (rr->uri) {
- add_property_string(return_value,"uri", rr->uri, 1);
+ add_property_string(return_value,"uri", rr->uri);
}
if (rr->filename) {
- add_property_string(return_value,"filename", rr->filename, 1);
+ add_property_string(return_value,"filename", rr->filename);
}
if (rr->path_info) {
- add_property_string(return_value,"path_info", rr->path_info, 1);
+ add_property_string(return_value,"path_info", rr->path_info);
}
if (rr->args) {
- add_property_string(return_value,"args", rr->args, 1);
+ add_property_string(return_value,"args", rr->args);
}
if (rr->boundary) {
- add_property_string(return_value,"boundary", rr->boundary, 1);
+ add_property_string(return_value,"boundary", rr->boundary);
}
add_property_long(return_value,"no_cache", rr->no_cache);
@@ -515,7 +515,7 @@ PHP_FUNCTION(apache_lookup_uri)
#if MODULE_MAGIC_NUMBER >= 19980324
if (rr->unparsed_uri) {
- add_property_string(return_value,"unparsed_uri", rr->unparsed_uri, 1);
+ add_property_string(return_value,"unparsed_uri", rr->unparsed_uri);
}
if(rr->mtime) {
add_property_long(return_value,"mtime", rr->mtime);
@@ -580,9 +580,9 @@ PHP_FUNCTION(apache_get_modules)
for (n = 0; ap_loaded_modules[n]; ++n) {
char *s = (char *) ap_loaded_modules[n]->name;
if ((p = strchr(s, '.'))) {
- add_next_index_stringl(return_value, s, (p - s), 1);
+ add_next_index_stringl(return_value, s, (p - s));
} else {
- add_next_index_string(return_value, s, 1);
+ add_next_index_string(return_value, s);
}
}
}
diff --git a/sapi/apache2filter/php_functions.c b/sapi/apache2filter/php_functions.c
index f1ae9c974b..3a0b3ee0b9 100644
--- a/sapi/apache2filter/php_functions.c
+++ b/sapi/apache2filter/php_functions.c
@@ -93,7 +93,7 @@ PHP_FUNCTION(virtual)
#define ADD_TIME(name) \
add_property_long(return_value, #name, apr_time_sec(rr->name));
#define ADD_STRING(name) \
- if (rr->name) add_property_string(return_value, #name, (char *) rr->name, 1)
+ if (rr->name) add_property_string(return_value, #name, (char *) rr->name)
PHP_FUNCTION(apache_lookup_uri)
{
@@ -163,7 +163,7 @@ PHP_FUNCTION(apache_request_headers)
APR_ARRAY_FOREACH_OPEN(arr, key, val)
if (!val) val = "";
- add_assoc_string(return_value, key, val, 1);
+ add_assoc_string(return_value, key, val);
APR_ARRAY_FOREACH_CLOSE()
}
/* }}} */
@@ -183,7 +183,7 @@ PHP_FUNCTION(apache_response_headers)
APR_ARRAY_FOREACH_OPEN(arr, key, val)
if (!val) val = "";
- add_assoc_string(return_value, key, val, 1);
+ add_assoc_string(return_value, key, val);
APR_ARRAY_FOREACH_CLOSE()
}
/* }}} */
@@ -313,9 +313,9 @@ PHP_FUNCTION(apache_get_modules)
for (n = 0; ap_loaded_modules[n]; ++n) {
char *s = (char *) ap_loaded_modules[n]->name;
if ((p = strchr(s, '.'))) {
- add_next_index_stringl(return_value, s, (p - s), 1);
+ add_next_index_stringl(return_value, s, (p - s));
} else {
- add_next_index_string(return_value, s, 1);
+ add_next_index_string(return_value, s);
}
}
}
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c
index 2c57300926..c6bed48dac 100644
--- a/sapi/apache2handler/php_functions.c
+++ b/sapi/apache2handler/php_functions.c
@@ -113,7 +113,7 @@ PHP_FUNCTION(virtual)
#define ADD_TIME(name) \
add_property_long(return_value, #name, apr_time_sec(rr->name));
#define ADD_STRING(name) \
- if (rr->name) add_property_string(return_value, #name, (char *) rr->name, 1)
+ if (rr->name) add_property_string(return_value, #name, (char *) rr->name)
PHP_FUNCTION(apache_lookup_uri)
{
@@ -187,7 +187,7 @@ PHP_FUNCTION(apache_request_headers)
APR_ARRAY_FOREACH_OPEN(arr, key, val)
if (!val) val = "";
- add_assoc_string(return_value, key, val, 1);
+ add_assoc_string(return_value, key, val);
APR_ARRAY_FOREACH_CLOSE()
}
/* }}} */
@@ -211,7 +211,7 @@ PHP_FUNCTION(apache_response_headers)
APR_ARRAY_FOREACH_OPEN(arr, key, val)
if (!val) val = "";
- add_assoc_string(return_value, key, val, 1);
+ add_assoc_string(return_value, key, val);
APR_ARRAY_FOREACH_CLOSE()
}
/* }}} */
@@ -355,9 +355,9 @@ PHP_FUNCTION(apache_get_modules)
for (n = 0; ap_loaded_modules[n]; ++n) {
char *s = (char *) ap_loaded_modules[n]->name;
if ((p = strchr(s, '.'))) {
- add_next_index_stringl(return_value, s, (p - s), 1);
+ add_next_index_stringl(return_value, s, (p - s));
} else {
- add_next_index_string(return_value, s, 1);
+ add_next_index_string(return_value, s);
}
}
}
diff --git a/sapi/apache_hooks/php_apache.c b/sapi/apache_hooks/php_apache.c
index 74a9a65acd..8045bbce32 100644
--- a/sapi/apache_hooks/php_apache.c
+++ b/sapi/apache_hooks/php_apache.c
@@ -1764,7 +1764,7 @@ static void apache_table_to_zval(table *t, zval *return_value)
if (!tenv[i].key) {
continue;
}
- if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) {
+ if (add_assoc_string(return_value, tenv[i].key, (tenv[i].val==NULL) ? "" : tenv[i].val)==FAILURE) {
RETURN_FALSE;
}
}
@@ -1848,34 +1848,34 @@ PHP_FUNCTION(apache_lookup_uri)
add_property_long(return_value,"status", rr->status);
if (rr->the_request) {
- add_property_string(return_value,"the_request", rr->the_request, 1);
+ add_property_string(return_value,"the_request", rr->the_request);
}
if (rr->status_line) {
- add_property_string(return_value,"status_line", (char *)rr->status_line, 1);
+ add_property_string(return_value,"status_line", (char *)rr->status_line);
}
if (rr->method) {
- add_property_string(return_value,"method", (char *)rr->method, 1);
+ add_property_string(return_value,"method", (char *)rr->method);
}
if (rr->content_type) {
- add_property_string(return_value,"content_type", (char *)rr->content_type, 1);
+ add_property_string(return_value,"content_type", (char *)rr->content_type);
}
if (rr->handler) {
- add_property_string(return_value,"handler", (char *)rr->handler, 1);
+ add_property_string(return_value,"handler", (char *)rr->handler);
}
if (rr->uri) {
- add_property_string(return_value,"uri", rr->uri, 1);
+ add_property_string(return_value,"uri", rr->uri);
}
if (rr->filename) {
- add_property_string(return_value,"filename", rr->filename, 1);
+ add_property_string(return_value,"filename", rr->filename);
}
if (rr->path_info) {
- add_property_string(return_value,"path_info", rr->path_info, 1);
+ add_property_string(return_value,"path_info", rr->path_info);
}
if (rr->args) {
- add_property_string(return_value,"args", rr->args, 1);
+ add_property_string(return_value,"args", rr->args);
}
if (rr->boundary) {
- add_property_string(return_value,"boundary", rr->boundary, 1);
+ add_property_string(return_value,"boundary", rr->boundary);
}
add_property_long(return_value,"no_cache", rr->no_cache);
add_property_long(return_value,"no_local_copy", rr->no_local_copy);
@@ -1887,7 +1887,7 @@ PHP_FUNCTION(apache_lookup_uri)
#if MODULE_MAGIC_NUMBER >= 19980324
if (rr->unparsed_uri) {
- add_property_string(return_value,"unparsed_uri", rr->unparsed_uri, 1);
+ add_property_string(return_value,"unparsed_uri", rr->unparsed_uri);
}
if(rr->mtime) {
add_property_long(return_value,"mtime", rr->mtime);
@@ -1952,9 +1952,9 @@ PHP_FUNCTION(apache_get_modules)
for (n = 0; ap_loaded_modules[n]; ++n) {
char *s = (char *) ap_loaded_modules[n]->name;
if ((p = strchr(s, '.'))) {
- add_next_index_stringl(return_value, s, (p - s), 1);
+ add_next_index_stringl(return_value, s, (p - s));
} else {
- add_next_index_string(return_value, s, 1);
+ add_next_index_string(return_value, s);
}
}
}
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 84a2702d4d..6384c66bca 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -1564,7 +1564,7 @@ static void add_request_header(char *var, unsigned int var_len, char *val, unsig
} else {
return;
}
- add_assoc_stringl_ex(return_value, var, var_len+1, val, val_len, 1);
+ add_assoc_stringl_ex(return_value, var, var_len+1, val, val_len);
if (str) {
free_alloca(var, use_heap);
}
@@ -1645,7 +1645,7 @@ PHP_FUNCTION(apache_request_headers) /* {{{ */
continue;
}
val++;
- add_assoc_string_ex(return_value, var, var_len, val, 1);
+ add_assoc_string_ex(return_value, var, var_len, val);
}
if (t != buf && t != NULL) {
efree(t);
@@ -1674,7 +1674,7 @@ static void add_response_header(sapi_header_struct *h, zval *return_value TSRMLS
do {
p++;
} while (*p == ' ' || *p == '\t');
- add_assoc_stringl_ex(return_value, s, len, p, h->header_len - (p - h->header), 1);
+ add_assoc_stringl_ex(return_value, s, len, p, h->header_len - (p - h->header));
free_alloca(s, use_heap);
}
}
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c
index 90316ce50c..c851115ec1 100644
--- a/sapi/cli/php_cli_server.c
+++ b/sapi/cli/php_cli_server.c
@@ -493,7 +493,7 @@ PHP_FUNCTION(apache_request_headers) /* {{{ */
while ((value = zend_hash_get_current_data_ptr_ex(headers, &pos)) != NULL) {
zend_hash_get_current_key_ex(headers, &key, NULL, 0, &pos);
//???
- add_assoc_string_ex(return_value, key->val, key->len, value, 1);
+ add_assoc_string_ex(return_value, key->val, key->len, value);
zend_hash_move_forward_ex(headers, &pos);
}
}
@@ -519,7 +519,7 @@ static void add_response_header(sapi_header_struct *h, zval *return_value TSRMLS
do {
p++;
} while (*p == ' ' || *p == '\t');
- add_assoc_stringl_ex(return_value, s, len, p, h->header_len - (p - h->header), 1);
+ add_assoc_stringl_ex(return_value, s, len, p, h->header_len - (p - h->header));
free_alloca(s, use_heap);
}
}
diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c
index 850433d29c..a4f314bdd9 100644
--- a/sapi/litespeed/lsapi_main.c
+++ b/sapi/litespeed/lsapi_main.c
@@ -1092,7 +1092,7 @@ zend_module_entry litespeed_module_entry = {
static int add_associate_array( const char * pKey, int keyLen, const char * pValue, int valLen,
void * arg )
{
- add_assoc_string_ex( (zval *)arg, (char *)pKey, keyLen+1, (char *)pValue, 1 );
+ add_assoc_string_ex( (zval *)arg, (char *)pKey, keyLen+1, (char *)pValue);
return 1;
}
@@ -1146,7 +1146,7 @@ PHP_FUNCTION(litespeed_response_headers)
headerBuf[len] = 0;
if ( len ) {
while( isspace(*++p));
- add_assoc_string_ex(return_value, headerBuf, len+1, p, 1 );
+ add_assoc_string_ex(return_value, headerBuf, len+1, p);
}
}
}
@@ -1166,10 +1166,10 @@ PHP_FUNCTION(apache_get_modules)
WRONG_PARAM_COUNT;
}
array_init(return_value);
- add_next_index_string(return_value, "mod_rewrite", 1);
- add_next_index_string(return_value, "mod_mime", 1);
- add_next_index_string(return_value, "mod_headers", 1);
- add_next_index_string(return_value, "mod_expires", 1);
+ add_next_index_string(return_value, "mod_rewrite");
+ add_next_index_string(return_value, "mod_mime");
+ add_next_index_string(return_value, "mod_headers");
+ add_next_index_string(return_value, "mod_expires");
}
/* }}} */
diff --git a/sapi/milter/php_milter.c b/sapi/milter/php_milter.c
index e0b2d0a0af..2f8e8117c2 100644
--- a/sapi/milter/php_milter.c
+++ b/sapi/milter/php_milter.c
@@ -290,7 +290,7 @@ static sfsistat mlfi_envfrom(SMFICTX *ctx, char **argv)
array_init(param[0]);
while (*argv) {
- add_next_index_string(param[0], *argv, 1);
+ add_next_index_string(param[0], *argv);
argv++;
}
@@ -330,7 +330,7 @@ static sfsistat mlfi_envrcpt(SMFICTX *ctx, char **argv)
array_init(param[0]);
while (*argv) {
- add_next_index_string(param[0], *argv, 1);
+ add_next_index_string(param[0], *argv);
argv++;
}
diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c
index 5ed133c18d..496596d773 100644
--- a/sapi/nsapi/nsapi.c
+++ b/sapi/nsapi/nsapi.c
@@ -414,7 +414,7 @@ PHP_FUNCTION(nsapi_request_headers)
for (i=0; i < rc->rq->headers->hsize; i++) {
entry=rc->rq->headers->ht[i];
while (entry) {
- add_assoc_string(return_value, entry->param->name, entry->param->value, 1);
+ add_assoc_string(return_value, entry->param->name, entry->param->value);
entry=entry->next;
}
}
@@ -438,7 +438,7 @@ PHP_FUNCTION(nsapi_response_headers)
for (i=0; i < rc->rq->srvhdrs->hsize; i++) {
entry=rc->rq->srvhdrs->ht[i];
while (entry) {
- add_assoc_string(return_value, entry->param->name, entry->param->value, 1);
+ add_assoc_string(return_value, entry->param->name, entry->param->value);
entry=entry->next;
}
}
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index d1dd468acb..f4abb97a90 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -98,7 +98,7 @@ static inline int phpdbg_call_register(phpdbg_input_t *input TSRMLS_DC) /* {{{ *
add_next_index_stringl(
&params,
input->argv[param+1]->string,
- input->argv[param+1]->length, 1);
+ input->argv[param+1]->length);
phpdbg_debug(
"created param[%d] from argv[%d]: %s",