X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_options.c;h=d4be512a7e1e9584cdace1a12429054fee90e471;hp=7a01b9cc385586fe5d7570af136db402d12be796;hb=1f37d09e4c7f55cf6f2c3c10ea3ec2424a482671;hpb=7096ff6dbb61fd13b9b04ef86bfbece8fb4b2ea0 diff --git a/php_http_options.c b/php_http_options.c index 7a01b9c..d4be512 100644 --- a/php_http_options.c +++ b/php_http_options.c @@ -19,7 +19,7 @@ static void php_http_options_hash_dtor(zval *pData) zval_ptr_dtor(&opt->defval); zend_hash_destroy(&opt->suboptions.options); zend_string_release(opt->name); - efree(opt); + pefree(opt, opt->persistent); } php_http_options_t *php_http_options_init(php_http_options_t *registry, zend_bool persistent) @@ -84,6 +84,7 @@ php_http_option_t *php_http_option_register(php_http_options_t *registry, const opt.suboptions.getter = registry->getter; opt.suboptions.setter = registry->setter; + opt.persistent = registry->persistent; opt.name = zend_string_init(name_str, name_len, registry->persistent); opt.type = type; opt.option = option; @@ -101,10 +102,6 @@ php_http_option_t *php_http_option_register(php_http_options_t *registry, const ZVAL_LONG(&opt.defval, 0); break; - case IS_STRING: - ZVAL_EMPTY_STRING(&opt.defval); - break; - case IS_DOUBLE: ZVAL_DOUBLE(&opt.defval, 0); break;