From: Michael Wallner Date: Tue, 9 Jan 2018 14:23:33 +0000 (+0100) Subject: fix build with master X-Git-Tag: v2.1.3~1 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=0e22011a2508823c3c4025d6930c8dce137cec8a;p=m6w6%2Fext-pq fix build with master --- diff --git a/src/php_pq_callback.c b/src/php_pq_callback.c index 17d7e70..2b58b40 100644 --- a/src/php_pq_callback.c +++ b/src/php_pq_callback.c @@ -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 } } diff --git a/src/php_pq_object.c b/src/php_pq_object.c index c7e04d6..7c695ff 100644 --- a/src/php_pq_object.c +++ b/src/php_pq_object.c @@ -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)