summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-07-09 17:44:41 +0000
committerZeev Suraski <zeev@php.net>1999-07-09 17:44:41 +0000
commit5f62c347c73300d5903a110c863be45b3b96c9f8 (patch)
tree352a88767f9131214ee23b909e0bb7ac29ea31f0 /ext/standard
parent3a9cb0220ce35e82065e92c4477b81373ab3e234 (diff)
downloadphp-git-5f62c347c73300d5903a110c863be45b3b96c9f8.tar.gz
Step 2:
Rename is_ref to EA
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/basic_functions.c14
-rw-r--r--ext/standard/fsock.c5
-rw-r--r--ext/standard/iptc.c2
-rw-r--r--ext/standard/post.c16
-rw-r--r--ext/standard/var.c10
5 files changed, 24 insertions, 23 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 6333f7b4d1..ac1e716970 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -1082,11 +1082,11 @@ void array_each(INTERNAL_FUNCTION_PARAMETERS)
entry = *entry_ptr;
/* add value elements */
- if (entry->is_ref) {
+ if (entry->EA) {
tmp = (pval *)emalloc(sizeof(pval));
*tmp = *entry;
pval_copy_constructor(tmp);
- tmp->is_ref=0;
+ tmp->EA=0;
tmp->refcount=0;
entry=tmp;
}
@@ -1131,7 +1131,7 @@ void array_reset(INTERNAL_FUNCTION_PARAMETERS)
*return_value = **entry;
pval_copy_constructor(return_value);
return_value->refcount=1;
- return_value->is_ref=0;
+ return_value->EA=0;
}
void array_current(INTERNAL_FUNCTION_PARAMETERS)
@@ -2362,7 +2362,7 @@ PHP_FUNCTION(extract)
data = (zval *)emalloc(sizeof(zval));
*data = *entry;
zval_copy_ctor(data);
- data->is_ref = 0;
+ data->EA = 0;
data->refcount = 1;
zend_hash_update(EG(active_symbol_table), finalname,
@@ -2392,7 +2392,7 @@ static void _compact_var(HashTable *eg_active_symbol_table, zval *return_value,
data = (zval *)emalloc(sizeof(zval));
*data = *value;
zval_copy_ctor(data);
- data->is_ref = 0;
+ data->EA = 0;
data->refcount = 1;
zend_hash_update(return_value->value.ht, entry->value.str.val,
@@ -2604,7 +2604,7 @@ static void _phpi_pop(INTERNAL_FUNCTION_PARAMETERS, int off_the_end)
*return_value = **val;
zval_copy_ctor(return_value);
return_value->refcount=1;
- return_value->is_ref=0;
+ return_value->EA=0;
/* Delete the first or last value */
new_hash = _phpi_splice(stack->value.ht, (off_the_end) ? -1 : 0, 1, NULL, 0, NULL);
@@ -2919,7 +2919,7 @@ PHP_FUNCTION(array_keys)
zend_hash_internal_pointer_reset(input->value.ht);
while(zend_hash_get_current_data(input->value.ht, (void **)&entry) == SUCCESS) {
new_val = (zval *)emalloc(sizeof(zval));
- new_val->is_ref = 0;
+ new_val->EA = 0;
new_val->refcount = 1;
switch (zend_hash_get_current_key(input->value.ht, &string_key, &num_key)) {
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index 1e863aa2c5..4469eab122 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -715,9 +715,10 @@ size_t _php3_sock_fread(char *ptr, size_t size, int socket)
/* {{{ _php3_sock_destroy */
#ifndef ZTS
-static void _php3_msock_destroy(int *data)
+static int _php3_msock_destroy(int *data)
{
close(*data);
+ return 1;
}
#endif
/* }}} */
@@ -727,7 +728,7 @@ int php3_minit_fsock(INIT_FUNC_ARGS)
{
#ifndef ZTS
_php3_hash_init(&PG(ht_fsock_keys), 0, NULL, NULL, 1);
- _php3_hash_init(&PG(ht_fsock_socks), 0, NULL, (void (*)(void *))_php3_msock_destroy, 1);
+ _php3_hash_init(&PG(ht_fsock_socks), 0, NULL, (int (*)(void *))_php3_msock_destroy, 1);
#endif
return SUCCESS;
}
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index 7b017ebb7a..78843059f4 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -368,7 +368,7 @@ PHP_FUNCTION(iptcparse)
if (_php3_hash_find(return_value->value.ht,key,strlen(key) + 1,(void **) &element) == FAILURE) {
values = emalloc(sizeof(pval));
- values->is_ref = 0;
+ values->EA = 0;
values->refcount = 1;
if (array_init(values) == FAILURE) {
php3_error(E_ERROR, "Unable to initialize array");
diff --git a/ext/standard/post.c b/ext/standard/post.c
index 168357f7d5..8d23632a73 100644
--- a/ext/standard/post.c
+++ b/ext/standard/post.c
@@ -144,7 +144,7 @@ static char *php3_getpost(pval *http_post_vars PLS_DC)
postdata_ptr->value.str.val = (char *) estrdup(buf);
postdata_ptr->value.str.len = cnt;
postdata_ptr->refcount=1;
- postdata_ptr->is_ref=0;
+ postdata_ptr->EA=0;
_php3_hash_add(&symbol_table, "HTTP_FDF_DATA", sizeof("HTTP_FDF_DATA"), postdata_ptr, sizeof(pval *),NULL);
}
#endif
@@ -225,7 +225,7 @@ void _php3_parse_gpc_data(char *val, char *var, pval *track_vars_array)
if (_php3_hash_find(EG(active_symbol_table), var, var_len+1, (void **) &arr_ptr) == FAILURE) {
arr1 = (pval *) emalloc(sizeof(pval));
arr1->refcount=1;
- arr1->is_ref=0;
+ arr1->EA=0;
if (array_init(arr1)==FAILURE) {
return;
}
@@ -233,7 +233,7 @@ void _php3_parse_gpc_data(char *val, char *var, pval *track_vars_array)
if (track_vars_array) {
arr2 = (pval *) emalloc(sizeof(pval));
arr2->refcount=1;
- arr2->is_ref=0;
+ arr2->EA=0;
if (array_init(arr2)==FAILURE) {
return;
}
@@ -244,7 +244,7 @@ void _php3_parse_gpc_data(char *val, char *var, pval *track_vars_array)
if (--(*arr_ptr) > 0) {
*arr_ptr = (pval *) emalloc(sizeof(pval));
(*arr_ptr)->refcount=1;
- (*arr_ptr)->is_ref=0;
+ (*arr_ptr)->EA=0;
} else {
pval_destructor(*arr_ptr);
}
@@ -254,7 +254,7 @@ void _php3_parse_gpc_data(char *val, char *var, pval *track_vars_array)
if (track_vars_array) {
arr2 = (pval *) emalloc(sizeof(pval));
arr2->refcount=1;
- arr2->is_ref=0;
+ arr2->EA=0;
if (array_init(arr2)==FAILURE) {
return;
}
@@ -270,7 +270,7 @@ void _php3_parse_gpc_data(char *val, char *var, pval *track_vars_array)
/* Now create the element */
entry = (pval *) emalloc(sizeof(pval));
entry->refcount=1;
- entry->is_ref=0;
+ entry->EA=0;
entry->value.str.val = val;
entry->value.str.len = val_len;
entry->type = IS_STRING;
@@ -304,7 +304,7 @@ void _php3_parse_gpc_data(char *val, char *var, pval *track_vars_array)
entry->type = IS_STRING;
entry->refcount=1;
- entry->is_ref=0;
+ entry->EA=0;
entry->value.str.val = val;
entry->value.str.len = val_len;
_php3_hash_update(EG(active_symbol_table), var, var_len+1, (void *) &entry, sizeof(pval *),NULL);
@@ -333,7 +333,7 @@ void php3_treat_data(int arg, char *str)
array_ptr = (pval *) emalloc(sizeof(pval));
array_init(array_ptr);
array_ptr->refcount=1;
- array_ptr->is_ref=0;
+ array_ptr->EA=0;
switch (arg) {
case PARSE_POST:
_php3_hash_add(&EG(symbol_table), "HTTP_POST_VARS", sizeof("HTTP_POST_VARS"), &array_ptr, sizeof(pval *),NULL);
diff --git a/ext/standard/var.c b/ext/standard/var.c
index c370439e22..c05b7a6dec 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -325,7 +325,7 @@ int php3api_var_unserialize(pval **rval, const char **p, const char *max)
(*rval)->type = IS_LONG;
}
(*rval)->refcount = 1;
- (*rval)->is_ref = 0;
+ (*rval)->EA = 0;
(*rval)->value.lval = atol(q + 2);
return 1;
@@ -343,7 +343,7 @@ int php3api_var_unserialize(pval **rval, const char **p, const char *max)
(*p)++;
(*rval)->type = IS_DOUBLE;
(*rval)->refcount = 1;
- (*rval)->is_ref = 0;
+ (*rval)->EA = 0;
(*rval)->value.dval = atof(q + 2);
return 1;
@@ -375,14 +375,14 @@ int php3api_var_unserialize(pval **rval, const char **p, const char *max)
(*rval)->value.str.val = str;
(*rval)->value.str.len = i;
(*rval)->refcount = 1;
- (*rval)->is_ref = 0;
+ (*rval)->EA = 0;
return 1;
case 'a':
(*rval)->type = IS_ARRAY;
(*rval)->refcount = 1;
- (*rval)->is_ref = 0;
+ (*rval)->EA = 0;
(*p) += 2;
i = atoi(*p);
(*rval)->value.ht = (HashTable *) emalloc(sizeof(HashTable));
@@ -424,7 +424,7 @@ int php3api_var_unserialize(pval **rval, const char **p, const char *max)
(*rval)->type = IS_OBJECT;
(*rval)->refcount = 1;
- (*rval)->is_ref = 0;
+ (*rval)->EA = 0;
(*p) += 2;
i = atoi(*p);
(*rval)->value.obj.properties = (HashTable *) emalloc(sizeof(HashTable));