}
static zval *php_http_message_object_read_prop(zval *object, zval *member, int type, void **cache_slot, zval *rv);
-static void php_http_message_object_write_prop(zval *object, zval *member, zval *value, void **cache_slot);
+
+static PHP_WRITE_PROP_HANDLER_TYPE php_http_message_object_write_prop(zval *object, zval *member, zval *value, void **cache_slot);
static zend_object_handlers php_http_message_object_handlers;
static HashTable php_http_message_object_prophandlers;
return return_value;
}
-static void php_http_message_object_write_prop(zval *object, zval *member, zval *value, void **cache_slot)
+static PHP_WRITE_PROP_HANDLER_TYPE php_http_message_object_write_prop(zval *object, zval *member, zval *value, void **cache_slot)
{
php_http_message_object_t *obj = PHP_HTTP_OBJ(NULL, object);
php_http_message_object_prophandler_t *handler;
}
zend_string_release(member_name);
+ PHP_WRITE_PROP_HANDLER_RETURN(value);
}
static HashTable *php_http_message_object_get_debug_info(zval *object, int *is_temp)
#if PHP_DEBUG
# undef HASH_OF
-# define HASH_OF(p) ((HashTable*)(Z_TYPE_P(p)==IS_ARRAY ? Z_ARRVAL_P(p) : ((Z_TYPE_P(p)==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties((p)) : NULL))))
+# if PHP_VERSION_ID >= 70500
+# define HASH_OF(p) ((HashTable*)(Z_TYPE_P(p)==IS_ARRAY ? Z_ARRVAL_P(p) : ((Z_TYPE_P(p)==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties(Z_OBJ_P(p)) : NULL))))
+# else
+# define HASH_OF(p) ((HashTable*)(Z_TYPE_P(p)==IS_ARRAY ? Z_ARRVAL_P(p) : ((Z_TYPE_P(p)==IS_OBJECT ? Z_OBJ_HT_P(p)->get_properties((p)) : NULL))))
+# endif
#endif
#ifndef GC_SET_REFCOUNT
# define HT_UNPROTECT_RECURSION(ht) GC_UNPROTECT_RECURSION(ht)
#endif
+#if PHP_VERSION_ID >= 70400
+# define PHP_WRITE_PROP_HANDLER_TYPE zval *
+# define PHP_WRITE_PROP_HANDLER_RETURN(v) return v
+#else
+# define PHP_WRITE_PROP_HANDLER_TYPE void
+# define PHP_WRITE_PROP_HANDLER_RETURN(v)
+#endif
+
static inline void *PHP_HTTP_OBJ(zend_object *zo, zval *zv)
{
if (!zo) {