From 75e62f6f51a0a8812e023e0233a64bde474c592f Mon Sep 17 00:00:00 2001 From: yuqing Date: Mon, 6 Jun 2016 21:07:45 +0800 Subject: [PATCH] correct zend_hash_update_wrapper for php7 --- src/php7_ext_wrapper.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/php7_ext_wrapper.h b/src/php7_ext_wrapper.h index 319a4a9..354de61 100644 --- a/src/php7_ext_wrapper.h +++ b/src/php7_ext_wrapper.h @@ -176,18 +176,20 @@ static inline int zend_hash_find_wrapper(HashTable *ht, char *key, int key_len, *value = zend_hash_find(ht, Z_STR(zkey)); return (*value != NULL ? SUCCESS : FAILURE); } + static inline int zend_hash_index_find_wrapper(HashTable *ht, int index, zval **value) { *value = zend_hash_index_find(ht, index); return (*value != NULL ? SUCCESS : FAILURE); } + static inline int zend_hash_update_wrapper(HashTable *ht, char *k, int len, - void *val, int size, void *ptr) + void **val, int size, void *ptr) { zval key; ZVAL_STRINGL(&key, k, len - 1); - return zend_hash_update(ht, Z_STR(key), val) ? SUCCESS : FAILURE; + return zend_hash_update(ht, Z_STR(key), *val) ? SUCCESS : FAILURE; } static inline int zend_call_user_function_wrapper(HashTable *function_table,