diff options
author | Andi Gutmans <andi@php.net> | 1999-12-24 15:43:39 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 1999-12-24 15:43:39 +0000 |
commit | 3f6e00e48ddef5ab2dd73aa093c3654edd6ca534 (patch) | |
tree | dbc0e52fe06f082ab90885c03c8ee6b316b42beb /ext/pcre/php_pcre.c | |
parent | 62b2087a84018cf19e569b0256f2c3cbf4179470 (diff) | |
download | php-git-3f6e00e48ddef5ab2dd73aa093c3654edd6ca534.tar.gz |
- 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.
Diffstat (limited to 'ext/pcre/php_pcre.c')
-rw-r--r-- | ext/pcre/php_pcre.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 865b94924d..aeaf0bf0df 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -393,7 +393,7 @@ static void _pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) 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 @@ static void _pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global) } else { /* Allocate the result set array */ - result_set = emalloc(sizeof(zval)); + result_set = ALLOC_ZVAL(); array_init(result_set); INIT_PZVAL(result_set); |