X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_message_object.c;h=aa63cab0b47fc8b98c325a6371a313606912954d;hp=b84bdfbbc88626d500ca3584eaacbea817f9e91a;hb=6e9ea0a647db55213dd230145c35a419d7abde4d;hpb=c0eca50e14a66bb29748b15e2999ccc83e67f506 diff --git a/http_message_object.c b/http_message_object.c index b84bdfb..aa63cab 100644 --- a/http_message_object.c +++ b/http_message_object.c @@ -34,8 +34,6 @@ extern PHPAPI zend_class_entry *spl_ce_Countable; # endif #endif -ZEND_EXTERN_MODULE_GLOBALS(http); - #define HTTP_BEGIN_ARGS(method, ret_ref, req_args) HTTP_BEGIN_ARGS_EX(HttpMessage, method, ret_ref, req_args) #define HTTP_EMPTY_ARGS(method, ret_ref) HTTP_EMPTY_ARGS_EX(HttpMessage, method, ret_ref) #define HTTP_MESSAGE_ME(method, visibility) PHP_ME(HttpMessage, method, HTTP_ARGS(HttpMessage, method), visibility) @@ -370,10 +368,7 @@ static void _http_message_object_write_prop(zval *object, zval *member, zval *va } #endif - ALLOC_ZVAL(cpy); - *cpy = *value; - zval_copy_ctor(cpy); - INIT_PZVAL(cpy); + cpy = zval_copy(Z_TYPE_P(value), value); #ifdef WONKY switch (h) @@ -458,7 +453,7 @@ static void _http_message_object_write_prop(zval *object, zval *member, zval *va #endif break; } - zval_ptr_dtor(&cpy); + zval_free(&cpy); } static HashTable *_http_message_object_get_props(zval *object TSRMLS_DC)