Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #1 from flavius/master

Update for 5.4
  • Loading branch information...
commit a1d5f63ca7a49037a3d431c93d9de127970bb59f 2 parents 2028555 + 43a2784
@skurfuerst authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 objectmonitor.c
View
14 objectmonitor.c
@@ -72,13 +72,17 @@ ZEND_GET_MODULE(objectmonitor)
* @param zval* property The name of the property which is changed
* @param zval* value The new value of the property.
*/
+#if PHP_VERSION_ID < 50399
void php_objectmonitor_write_property_handler(zval *object, zval *property, zval *value TSRMLS_DC) {
+#else
+void php_objectmonitor_write_property_handler(zval *object, zval *property, zval *value, const struct _zend_literal *key TSRMLS_DC) {
+#endif
zend_object_handle handleOfCurrentObject;
zval* propertyArray;
zval** propertyArray_p;
handleOfCurrentObject = Z_OBJ_HANDLE(*object);
-
+
if (zend_hash_index_find(Z_ARRVAL_P(OBJECTMONITOR_G(list_of_changed_objects)), handleOfCurrentObject, (void **)&propertyArray_p) == FAILURE) {
// Array entry for current object not found -> create it!
MAKE_STD_ZVAL(propertyArray);
@@ -99,7 +103,11 @@ void php_objectmonitor_write_property_handler(zval *object, zval *property, zval
add_assoc_zval(propertyArray, Z_STRVAL_P(property), value);
// call original property handler to actually change the property / call __set etc..
- OBJECTMONITOR_G(original_write_property_handler)(object, property, value TSRMLS_DC);
+#if PHP_VERSION_ID < 50399
+ OBJECTMONITOR_G(original_write_property_handler)(object, property, value TSRMLS_CC);
+#else
+ OBJECTMONITOR_G(original_write_property_handler)(object, property, value, key TSRMLS_CC);
+#endif
}
/**
@@ -219,4 +227,4 @@ PHP_FUNCTION(objectmonitor_get_changes)
* End:
* vim600: noet sw=4 ts=4 fdm=marker
* vim<600: noet sw=4 ts=4
- */
+ */

0 comments on commit a1d5f63

Please sign in to comment.
Something went wrong with that request. Please try again.