X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_request_object.c;h=f4f27cf0718892e48c918e6b5685c3ee28d1165e;hp=d502006f60a044d93a8e7142cf59bd5b6a12529c;hb=addc97f0d58f4234080f520703c11b1d24940d3a;hpb=b045ad02a109f508cda8971667f75347ff63cfa1 diff --git a/http_request_object.c b/http_request_object.c index d502006..f4f27cf 100644 --- a/http_request_object.c +++ b/http_request_object.c @@ -493,8 +493,8 @@ zend_object_value _http_request_object_new_ex(zend_class_entry *ce, CURL *ch, ht } #ifdef ZEND_ENGINE_2_4 - zend_object_std_init(OBJ_PROP(o), ce TSRMLS_CC); - object_properties_init(OBJ_PROP(o), ce); + zend_object_std_init(o, ce TSRMLS_CC); + object_properties_init(o, ce); #else ALLOC_HASHTABLE(OBJ_PROP(o)); zend_hash_init(OBJ_PROP(o), zend_hash_num_elements(&ce->default_properties), NULL, ZVAL_PTR_DTOR, 0); @@ -683,7 +683,7 @@ STATUS _http_request_object_requesthandler(http_request_object *obj, zval *this_ if ( (Z_TYPE_P(options) != IS_ARRAY) || (SUCCESS != zend_hash_find(Z_ARRVAL_P(options), "onprogress", sizeof("onprogress"), (void *) &entry) - || (!IS_CALLABLE(*entry, 0, NULL)))) { + || (!HTTP_IS_CALLABLE(*entry, 0, NULL)))) { MAKE_STD_ZVAL(pcb); array_init(pcb); ZVAL_ADDREF(getThis()); @@ -788,8 +788,12 @@ STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this return ret; } - -static int apply_pretty_key(void *pDest, int num_args, va_list args, zend_hash_key *hash_key) +#ifdef ZEND_ENGINE_2_4 +# define APK_DC TSRMLS_DC +#else +# define APK_DC +#endif +static int apply_pretty_key(void *pDest APK_DC, int num_args, va_list args, zend_hash_key *hash_key) { if (hash_key->arKey && hash_key->nKeyLength > 1) { hash_key->h = zend_hash_func(pretty_key(hash_key->arKey, hash_key->nKeyLength - 1, 1, 0), hash_key->nKeyLength);