*ptr = o;
}
-#if PHP_VERSION_ID < 50399
+#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 *));
-#else
- object_properties_init(&o->zo, ce);
#endif
ov.handle = putObject(http_requestdatashare_object, o);
static zval *_http_requestdatashare_object_read_prop(zval *object, zval *member, int type ZEND_LITERAL_KEY_DC TSRMLS_DC)
{
if (type == BP_VAR_W &&
-#if PHP_VERSION_ID < 50399
- zend_hash_exists(&THIS_CE->default_properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1)
+#ifdef ZEND_ENGINE_2_4
+ zend_hash_exists(&THIS_CE->properties_info, Z_STRVAL_P(member), Z_STRLEN_P(member)+1)
#else
- zend_get_property_info(THIS_CE, member, 1 TSRMLS_CC)
-#endif
+ zend_hash_exists(&THIS_CE->default_properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1)
+#endif
) {
zend_error(E_ERROR, "Cannot access HttpRequestDataShare default properties by reference or array key/index");
return NULL;
static void _http_requestdatashare_object_write_prop(zval *object, zval *member, zval *value ZEND_LITERAL_KEY_DC TSRMLS_DC)
{
-#if PHP_VERSION_ID < 50399
- if (zend_hash_exists(&THIS_CE->default_properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1)) {
+ if (
+#ifdef ZEND_ENGINE_2_4
+ zend_hash_exists(&THIS_CE->properties_info, Z_STRVAL_P(member), Z_STRLEN_P(member)+1)
#else
- if (zend_get_property_info(THIS_CE, member, 1 TSRMLS_CC)) {
+ zend_hash_exists(&THIS_CE->default_properties, Z_STRVAL_P(member), Z_STRLEN_P(member)+1)
#endif
+ ) {
int status;
getObjectEx(http_requestdatashare_object, obj, object);