X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=missing.c;fp=missing.c;h=fea611c8eb5718f86ed3a05d51b0d724ccfdc8a4;hb=061fbbe598d6e28b35c408b35beec1a6508abac9;hp=dcf4709a84b8dab11cb267790e757e13c7003c6c;hpb=b107d451def2ff6dcdaad2cfc23bb0344b4a3baf;p=m6w6%2Fext-http diff --git a/missing.c b/missing.c index dcf4709..fea611c 100644 --- a/missing.c +++ b/missing.c @@ -38,6 +38,7 @@ static inline zval *tmp_zval(void) static void dup_zval(zval **z) { + zval *o = *z; zval_add_ref(z); SEPARATE_ZVAL(z); } @@ -145,7 +146,7 @@ int zend_update_static_property(zend_class_entry *scope, char *name, size_t name } retval = SUCCESS; } - + zval_ptr_dtor(&value); EG(scope) = old_scope; return retval; @@ -190,7 +191,7 @@ void zend_fix_static_properties(zend_class_entry *ce, HashTable *static_members { zend_hash_copy(static_members, ce->static_members, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *)); zend_hash_destroy(ce->static_members); - zend_hash_init_ex(ce->static_members, 0, NULL, ZVAL_PTR_DTOR, 1, 0); + zend_hash_init_ex(ce->static_members, static_members->nNumOfElements, NULL, ZVAL_PTR_DTOR, 1, 0); } void zend_init_static_properties(zend_class_entry *ce, HashTable *static_members TSRMLS_DC)