From aa6d2ac5d0ee1d7cd608c6930ad0c57bc2953c47 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Fri, 22 Dec 2000 12:57:09 +0000 Subject: Heads up people! Updated the get_current_key() API - the relevant authors, please take a look at the updated code and make sure it's ok... --- ext/pcre/php_pcre.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ext/pcre/php_pcre.c') diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 9c39bf8324..e4480d468c 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -1017,11 +1017,10 @@ PHP_FUNCTION(preg_replace) (void **)&subject_entry) == SUCCESS) { if ((result = php_replace_in_subject(*regex, *replace, subject_entry, &result_len, limit_val)) != NULL) { /* Add to return array */ - switch(zend_hash_get_current_key((*subject)->value.ht, &string_key, &num_key)) + switch(zend_hash_get_current_key((*subject)->value.ht, &string_key, &num_key, 0)) { case HASH_KEY_IS_STRING: add_assoc_stringl(return_value, string_key, result, result_len, 0); - efree(string_key); break; case HASH_KEY_IS_LONG: @@ -1314,12 +1313,11 @@ PHP_FUNCTION(preg_grep) (*entry)->refcount++; /* Add to return array */ - switch(zend_hash_get_current_key((*input)->value.ht, &string_key, &num_key)) + switch(zend_hash_get_current_key((*input)->value.ht, &string_key, &num_key, 0)) { case HASH_KEY_IS_STRING: zend_hash_update(return_value->value.ht, string_key, strlen(string_key)+1, entry, sizeof(zval *), NULL); - efree(string_key); break; case HASH_KEY_IS_LONG: -- cgit v1.2.1