X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_object.c;h=f06157a4e2c4f96fd3209bf4e5f126dc02b39b5f;hp=8ea09b0f0af7a2528a1dbf01957b206dfd8f5175;hb=ad5f896b03adaa073134a00108a9cdf00720673a;hpb=34c551d43ab4fbfff88a81e545a43fbbf7a8a75d diff --git a/http_request_object.c b/http_request_object.c index 8ea09b0..f06157a 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -492,9 +492,13 @@ zend_object_value _http_request_object_new_ex(zend_class_entry *ce, CURL *ch, ht *ptr = o; } +#if PHP_VERSION_ID < 50399 ALLOC_HASHTABLE(OBJ_PROP(o)); zend_hash_init(OBJ_PROP(o), zend_hash_num_elements(&ce->default_properties), NULL, ZVAL_PTR_DTOR, 0); zend_hash_copy(OBJ_PROP(o), &ce->default_properties, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *)); +#else + object_properties_init(&o->zo, ce); +#endif ov.handle = putObject(http_request_object, o); ov.handlers = &http_request_object_handlers;