php4-beta | 199912
Date: 12/24/99
- Next message: Sascha Schumann: "[PHP4BETA] cvs: /php4 configure.in"
- Previous message: Manuel Lemos: "[PHP4BETA] Re: [PHP3] Merry Christmas"
- Next in thread: Thies C. Arntzen: "Re: [PHP4BETA] cvs: /php4/ext/hyperwave hw.c /php4/ext/pcre php_pcre.c /php4/ext/session session.c /php4/ext/standard array.c /php4/ext/wddx wddx.c /php4/sapi/isapi php4isapi.c"
- Reply: Thies C. Arntzen: "Re: [PHP4BETA] cvs: /php4/ext/hyperwave hw.c /php4/ext/pcre php_pcre.c /php4/ext/session session.c /php4/ext/standard array.c /php4/ext/wddx wddx.c /php4/sapi/isapi php4isapi.c"
- Maybe reply: Andi Gutmans: "Re: [PHP4BETA] cvs: /php4/ext/hyperwave hw.c /php4/ext/pcre php_pcre.c /php4/ext/session session.c /php4/ext/standard array.c /php4/ext/wddx wddx.c /php4/sapi/isapi php4isapi.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
andi Fri Dec 24 10:44:09 1999 EDT
Modified files:
/php4/ext/hyperwave hw.c
/php4/ext/pcre php_pcre.c
/php4/ext/session session.c
/php4/ext/standard array.c
/php4/ext/wddx wddx.c
/php4/sapi/isapi php4isapi.c
Log:
- Use ALLOC_ZVAL() in PHP. Finding the places to put FREE_ZVAL(z) is much
more tricky and I'm not sure how many places this is. zval allocations
were only made directly in 11 places.
Index: php4/ext/hyperwave/hw.c
diff -u php4/ext/hyperwave/hw.c:1.34 php4/ext/hyperwave/hw.c:1.35
--- php4/ext/hyperwave/hw.c:1.34 Sat Dec 18 17:35:05 1999
+++ php4/ext/hyperwave/hw.c Fri Dec 24 10:43:36 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: hw.c,v 1.34 1999/12/18 22:35:05 zeev Exp $ */
+/* $Id: hw.c,v 1.35 1999/12/24 15:43:36 andi Exp $ */
#if COMPILE_DL
#include "dl/phpdl.h"
#endif
@@ -1175,7 +1175,7 @@
while(attrname != NULL) {
char *name;
- user_arr = (zval *) emalloc(sizeof(zval));
+ user_arr = ALLOC_ZVAL();
if (array_init(user_arr) == FAILURE) {
efree(object);
RETURN_FALSE;
Index: php4/ext/pcre/php_pcre.c
diff -u php4/ext/pcre/php_pcre.c:1.34 php4/ext/pcre/php_pcre.c:1.35
--- php4/ext/pcre/php_pcre.c:1.34 Mon Dec 20 15:49:56 1999
+++ php4/ext/pcre/php_pcre.c Fri Dec 24 10:43:36 1999
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_pcre.c,v 1.34 1999/12/20 20:49:56 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.35 1999/12/24 15:43:36 andi Exp $ */
/*
TODO:
@@ -393,7 +393,7 @@
if (global && subpats_order_val == PREG_PATTERN_ORDER) {
match_sets = (zval **)emalloc(num_subpats * sizeof(zval *));
for (i=0; i<num_subpats; i++) {
- match_sets[i] = (zval *)emalloc(sizeof(zval));
+ match_sets[i] = ALLOC_ZVAL();
array_init(match_sets[i]);
INIT_PZVAL(match_sets[i]);
}
@@ -441,7 +441,7 @@
}
else {
/* Allocate the result set array */
- result_set = emalloc(sizeof(zval));
+ result_set = ALLOC_ZVAL();
array_init(result_set);
INIT_PZVAL(result_set);
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.87 php4/ext/session/session.c:1.88
--- php4/ext/session/session.c:1.87 Tue Dec 21 19:38:04 1999
+++ php4/ext/session/session.c Fri Dec 24 10:43:37 1999
@@ -176,7 +176,7 @@
PLS_FETCH();
ELS_FETCH();
- state_val_copy = (zval *)emalloc(sizeof(zval));
+ state_val_copy = ALLOC_ZVAL();
*state_val_copy = *state_val;
zval_copy_ctor(state_val_copy);
state_val_copy->refcount = 0;
Index: php4/ext/standard/array.c
diff -u php4/ext/standard/array.c:1.17 php4/ext/standard/array.c:1.18
--- php4/ext/standard/array.c:1.17 Tue Dec 21 12:14:31 1999
+++ php4/ext/standard/array.c Fri Dec 24 10:43:38 1999
@@ -1059,7 +1059,7 @@
if (zend_hash_find(eg_active_symbol_table, entry->value.str.val,
entry->value.str.len+1, (void **)&value_ptr) != FAILURE) {
value = *value_ptr;
- data = (zval *)emalloc(sizeof(zval));
+ data = ALLOC_ZVAL();
*data = *value;
zval_copy_ctor(data);
INIT_PZVAL(data);
Index: php4/ext/wddx/wddx.c
diff -u php4/ext/wddx/wddx.c:1.17 php4/ext/wddx/wddx.c:1.18
--- php4/ext/wddx/wddx.c:1.17 Sat Dec 18 17:35:31 1999
+++ php4/ext/wddx/wddx.c Fri Dec 24 10:43:38 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: wddx.c,v 1.17 1999/12/18 22:35:31 zeev Exp $ */
+/* $Id: wddx.c,v 1.18 1999/12/24 15:43:38 andi Exp $ */
#include "php.h"
#include "php_wddx.h"
@@ -468,7 +468,7 @@
} else
ent.varname = NULL;
- ent.data = (zval *)emalloc(sizeof(zval));
+ ent.data = ALLOC_ZVAL();
ent.data->value.str.val = NULL;
ent.data->value.str.len = 0;
INIT_PZVAL(ent.data);
@@ -492,7 +492,7 @@
} else
ent.varname = NULL;
- ent.data = (zval *)emalloc(sizeof(zval));
+ ent.data = ALLOC_ZVAL();
INIT_PZVAL(ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
} else if (!strcmp(name, EL_ARRAY)) {
@@ -504,7 +504,7 @@
} else
ent.varname = NULL;
- ent.data = (zval *)emalloc(sizeof(zval));
+ ent.data = ALLOC_ZVAL();
array_init(ent.data);
INIT_PZVAL(ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
@@ -517,7 +517,7 @@
} else
ent.varname = NULL;
- ent.data = (zval *)emalloc(sizeof(zval));
+ ent.data = ALLOC_ZVAL();
array_init(ent.data);
INIT_PZVAL(ent.data);
wddx_stack_push((wddx_stack *)stack, &ent, sizeof(st_entry));
Index: php4/sapi/isapi/php4isapi.c
diff -u php4/sapi/isapi/php4isapi.c:1.7 php4/sapi/isapi/php4isapi.c:1.8
--- php4/sapi/isapi/php4isapi.c:1.7 Mon Dec 20 18:09:52 1999
+++ php4/sapi/isapi/php4isapi.c Fri Dec 24 10:43:39 1999
@@ -407,7 +407,7 @@
if (colon) {
char *value = colon+1;
- zval *entry = (zval *) emalloc(sizeof(zval));
+ zval *entry = ALLOC_ZVAL();
while (*value==' ') {
value++;
-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe <email protected> For additional commands, e-mail: php4beta-help <email protected> To contact the list administrators, e-mail: php4beta-admin <email protected>
- Next message: Sascha Schumann: "[PHP4BETA] cvs: /php4 configure.in"
- Previous message: Manuel Lemos: "[PHP4BETA] Re: [PHP3] Merry Christmas"
- Next in thread: Thies C. Arntzen: "Re: [PHP4BETA] cvs: /php4/ext/hyperwave hw.c /php4/ext/pcre php_pcre.c /php4/ext/session session.c /php4/ext/standard array.c /php4/ext/wddx wddx.c /php4/sapi/isapi php4isapi.c"
- Reply: Thies C. Arntzen: "Re: [PHP4BETA] cvs: /php4/ext/hyperwave hw.c /php4/ext/pcre php_pcre.c /php4/ext/session session.c /php4/ext/standard array.c /php4/ext/wddx wddx.c /php4/sapi/isapi php4isapi.c"
- Maybe reply: Andi Gutmans: "Re: [PHP4BETA] cvs: /php4/ext/hyperwave hw.c /php4/ext/pcre php_pcre.c /php4/ext/session session.c /php4/ext/standard array.c /php4/ext/wddx wddx.c /php4/sapi/isapi php4isapi.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

