andreiz / php-zookeeper

A PHP extension for interfacing with Apache ZooKeeper
Other
449 stars 215 forks source link

Fix 5.4.x compile issue #20

Closed ghost closed 11 years ago

ghost commented 11 years ago

When compile under 5.4, it failed. the code in master not works:

`#if PHP_VERSION_ID >= 50400 object_properties_init( (zend_object *) i_obj, ce);

else

zend_hash_copy(i_obj->zo.properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));

endif

` So I change to the method below, and it works now:

`#if PHP_VERSION_ID < 50399 zend_hash_copy(i_obj->zo.properties, &ce->default_properties, (copy_ctor_func_t) zval_add_ref, (void ) &tmp, sizeof(zval ));

else

object_properties_init( (zend_object *) i_obj, ce);

endif

` here is bug : https://bugs.php.net/bug.php?id=64336