*ptr = o;
}
+#ifdef ZEND_ENGINE_2_4
+ 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);
zend_hash_copy(OBJ_PROP(o), &ce->default_properties, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
+#endif
ov.handle = putObject(http_request_object, o);
ov.handlers = &http_request_object_handlers;
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());
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);