if (!h) {
free_h = h = emalloc(sizeof(*h));
}
- memset(h, sizeof(*h), 0);
+ memset(h, 0, sizeof(*h));
zend_llist_init(&h->clients, sizeof(zval *), ZVAL_PTR_DTOR, 0);
h->ops = ops;
PHP_HTTP_ARG_OBJ(http\\Client, client, 0)
PHP_HTTP_END_ARGS;
-static void php_http_client_datashare_object_write_prop(zval *object, zval *member, zval *value
-#if PHP_VERSION_ID >= 50400
-, const zend_literal *literal_key
-#endif
-TSRMLS_DC);
+static void php_http_client_datashare_object_write_prop(zval *object, zval *member, zval *value PHP_HTTP_ZEND_LITERAL_DC TSRMLS_DC);
static zend_class_entry *php_http_client_datashare_class_entry;
o = ecalloc(1, sizeof(*o));
zend_object_std_init((zend_object *) o, ce TSRMLS_CC);
-#if PHP_VERSION_ID < 50339
- zend_hash_copy(((zend_object *) o)->properties, &(ce->default_properties), (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval*));
-#else
object_properties_init((zend_object *) o, ce);
-#endif
ov.handle = zend_objects_store_put(o, NULL, php_http_client_datashare_object_free, NULL TSRMLS_CC);
ov.handlers = &php_http_client_datashare_object_handlers;
efree(o);
}
-static void php_http_client_datashare_object_write_prop(zval *object, zval *member, zval *value
-#if PHP_VERSION_ID >= 50400
-, const zend_literal *literal_key
-#endif
-TSRMLS_DC)
+static void php_http_client_datashare_object_write_prop(zval *object, zval *member, zval *value PHP_HTTP_ZEND_LITERAL_DC TSRMLS_DC)
{
zend_property_info *pi;
}
}
- zend_get_std_object_handlers()->write_property(object, member, value
-#if PHP_VERSION_ID >= 50400
- , literal_key
-#endif
- TSRMLS_CC);
+ zend_get_std_object_handlers()->write_property(object, member, value PHP_HTTP_ZEND_LITERAL_CC TSRMLS_CC);
}
-static zval **php_http_client_datashare_object_get_prop_ptr(zval *object, zval *member
-#if PHP_VERSION_ID >= 50400
-, const zend_literal *literal_key
-#endif
-TSRMLS_DC)
+static zval **php_http_client_datashare_object_get_prop_ptr(zval *object, zval *member PHP_HTTP_ZEND_LITERAL_DC TSRMLS_DC)
{
zend_property_info *pi;
return &php_http_property_proxy_init(NULL, object, member, NULL TSRMLS_CC)->myself;
}
- return zend_get_std_object_handlers()->get_property_ptr_ptr(object, member
-#if PHP_VERSION_ID >= 50400
- , literal_key
-#endif
- TSRMLS_CC);
+ return zend_get_std_object_handlers()->get_property_ptr_ptr(object, member PHP_HTTP_ZEND_LITERAL_CC TSRMLS_CC);
}