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 17d7e70..2b58b40 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 c7e04d6..7c695ff 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)