fix build with master
authorMichael Wallner <mike@php.net>
Tue, 9 Jan 2018 14:23:33 +0000 (15:23 +0100)
committerMichael Wallner <mike@php.net>
Tue, 9 Jan 2018 14:23:33 +0000 (15:23 +0100)
src/php_pq_callback.c
src/php_pq_object.c

index 17d7e70efeff025b9d2e6fb3cd2ed402ea3fbfd7..2b58b40034494857ddac31e75d6e11693b15992c 100644 (file)
@@ -43,7 +43,11 @@ void php_pq_callback_addref(php_pq_callback_t *cb)
 {
        Z_TRY_ADDREF(cb->fci.function_name);
        if (cb->fci.object) {
+#ifdef GC_ADDREF
+               GC_ADDREF(cb->fci.object);
+#else
                ++GC_REFCOUNT(cb->fci.object);
+#endif
        }
 }
 
index c7e04d63a52149b480eace075ae3d989d06c1d0b..7c695ffd511923c0270f23f028e4125495c09c37 100644 (file)
@@ -59,7 +59,11 @@ void php_pq_object_to_zval_no_addref(void *o, zval *zv)
 void php_pq_object_addref(void *o)
 {
        php_pq_object_t *obj = o;
+#ifdef GC_ADDREF
+       GC_ADDREF(&obj->zo);
+#else
        ++GC_REFCOUNT(&obj->zo);
+#endif
 }
 
 void php_pq_object_delref(void *o)