X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_object.c;h=f06157a4e2c4f96fd3209bf4e5f126dc02b39b5f;hp=aa83504338fa8db2bd0514107fb700d855870aec;hb=7e20868975f5c23ccd74af0d8f7147c506d2b8cf;hpb=c92706acc1434773bc91c9acdeb85e48c88c5129 diff --git a/http_request_object.c b/http_request_object.c index aa83504..f06157a 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2007, Michael Wallner | + | Copyright (c) 2004-2010, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -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;