Skip to content
Snippets Groups Projects
Commit 58485178 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

PHP 7.3 rebuild

parent e4aec226
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
pkgname=php-memcache
pkgver=3.0.8
pkgrel=6
pkgrel=7
_commit=fdbd46bbc6f53ed6e024521895e142cbfc9b3340
pkgdesc="Memcache module for PHP"
arch=('x86_64')
......@@ -14,12 +14,17 @@ checkdepends=('memcached')
backup=('etc/php/conf.d/memcache.ini')
install=php-memcache.install
#source=(https://pecl.php.net/get/memcache-$pkgver.tgz)
source=("git+https://github.com/websupport-sk/pecl-memcache.git#commit=$_commit")
sha256sums=('SKIP')
source=("git+https://github.com/websupport-sk/pecl-memcache.git#commit=$_commit"
php73.patch)
sha256sums=('SKIP'
'4192de8fde7e69ce8d14053d1e0842d61239da4ca9a1317a9451075c4188be0f')
prepare() {
cd "$srcdir/pecl-memcache"
# https://github.com/php/php-src/blob/php-7.3.0RC1/UPGRADING.INTERNALS#L90-L96
patch -Np1 -i ../php73.patch
# Disable UDP tests
sed -i "s|^\(\$udpPort2\? =\) .*|\1 0;|" tests/connect.inc
......
diff --git a/php7/memcache.c b/php7/memcache.c
index c7d4e0a..1818db4 100644
--- a/php7/memcache.c
+++ b/php7/memcache.c
@@ -721,7 +721,7 @@ mmc_t *mmc_find_persistent(const char *host, int host_len, unsigned short port,
mmc = mmc_server_new(host, host_len, port, udp_port, 1, timeout, retry_interval);
le->type = le_memcache_server;
le->ptr = mmc;
- GC_REFCOUNT(le) = 1;
+ GC_SET_REFCOUNT(le, 1);
/* register new persistent connection */
if (zend_hash_str_update_mem(&EG(persistent_list), key, key_len, le, sizeof(*le)) == NULL) {
@@ -779,7 +779,7 @@ static mmc_t *php_mmc_pool_addserver(
pool->failure_callback = &php_mmc_failure_callback;
list_res = zend_register_resource(pool, le_memcache_pool);
add_property_resource(mmc_object, "connection", list_res);
- GC_REFCOUNT(list_res)++;
+ GC_ADDREF(list_res);
}
else {
pool = zend_fetch_resource_ex(connection, "connection", le_memcache_pool);
@@ -863,7 +863,7 @@ static void php_mmc_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool persistent)
mmc_object = return_value;
object_init_ex(mmc_object, memcache_ce);
add_property_resource(mmc_object, "connection", list_res);
- GC_REFCOUNT(list_res)++;
+ GC_ADDREF(list_res);
} else {
RETVAL_TRUE;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment