Update to 0.3.3
Changes: https://github.com/tarantool/tarantool-php/releases
This commit is contained in:
parent
d3355a9bd3
commit
bd0048f042
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=541557
5 changed files with 5 additions and 154 deletions
|
@ -2,7 +2,7 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= tarantool
|
||||
PORTVERSION= 0.3.2
|
||||
PORTVERSION= 0.3.3
|
||||
CATEGORIES= databases
|
||||
PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX}
|
||||
|
||||
|
@ -17,6 +17,6 @@ USES= php:ext
|
|||
CONFIGURE_ARGS= --with-tarantool
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_PROJECT= ${PORTNAME}-php
|
||||
GH_PROJECT= tarantool-php
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
TIMESTAMP = 1524259086
|
||||
SHA256 (tarantool-tarantool-php-0.3.2_GH0.tar.gz) = a7c71be3ceaeb5b760a9742a39f483c8a5ce2bc15a8bd29fd34bb29957559c25
|
||||
SIZE (tarantool-tarantool-php-0.3.2_GH0.tar.gz) = 684980
|
||||
TIMESTAMP = 1594117169
|
||||
SHA256 (tarantool-tarantool-php-0.3.3_GH0.tar.gz) = 0fcfb6059e20389b823f49bbbbfcfdd232678ae8ed7c27e07278d565e6530d95
|
||||
SIZE (tarantool-tarantool-php-0.3.3_GH0.tar.gz) = 108601
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
--- src/tarantool.c.orig 2018-04-18 13:33:56 UTC
|
||||
+++ src/tarantool.c
|
||||
@@ -1151,7 +1151,11 @@ PHP_METHOD(Tarantool, __construct) {
|
||||
memset(&le, 0, sizeof(zend_resource));
|
||||
le.type = php_tarantool_list_entry();
|
||||
le.ptr = obj;
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ GC_SET_REFCOUNT(&le, 1);
|
||||
+#else
|
||||
GC_REFCOUNT(&le) = 1;
|
||||
+#endif
|
||||
|
||||
assert(plist_id != NULL);
|
||||
if (zend_hash_update_mem(&EG(persistent_list), plist_id,
|
|
@ -1,122 +0,0 @@
|
|||
--- src/tarantool_msgpack.c.orig 2018-04-18 13:33:56 UTC
|
||||
+++ src/tarantool_msgpack.c
|
||||
@@ -123,15 +123,30 @@ void php_mp_pack_array_recursively(smart
|
||||
for (; key_index < n; ++key_index) {
|
||||
data = zend_hash_index_find(ht, key_index);
|
||||
if (!data || data == val || (Z_TYPE_P(data) == IS_ARRAY &&
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE) &&
|
||||
+ GC_IS_RECURSIVE(Z_ARRVAL_P(data)))) {
|
||||
+#else
|
||||
ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)) &&
|
||||
Z_ARRVAL_P(data)->u.v.nApplyCount > 1)) {
|
||||
+#endif
|
||||
php_mp_pack_nil(str);
|
||||
} else {
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE))
|
||||
+ GC_PROTECT_RECURSION(Z_ARRVAL_P(data));
|
||||
+#else
|
||||
if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)))
|
||||
Z_ARRVAL_P(data)->u.v.nApplyCount++;
|
||||
+#endif
|
||||
php_mp_pack(str, data);
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE))
|
||||
+ GC_UNPROTECT_RECURSION(Z_ARRVAL_P(data));
|
||||
+#else
|
||||
if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)))
|
||||
Z_ARRVAL_P(data)->u.v.nApplyCount--;
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -166,15 +181,30 @@ void php_mp_pack_hash_recursively(smart_
|
||||
}
|
||||
data = zend_hash_get_current_data_ex(ht, &pos);
|
||||
if (!data || data == val || (Z_TYPE_P(data) == IS_ARRAY &&
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE) &&
|
||||
+ GC_IS_RECURSIVE(Z_ARRVAL_P(data)))) {
|
||||
+#else
|
||||
ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)) &&
|
||||
Z_ARRVAL_P(data)->u.v.nApplyCount > 1)) {
|
||||
+#endif
|
||||
php_mp_pack_nil(str);
|
||||
} else {
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE))
|
||||
+ GC_PROTECT_RECURSION(Z_ARRVAL_P(data));
|
||||
+#else
|
||||
if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)))
|
||||
Z_ARRVAL_P(data)->u.v.nApplyCount++;
|
||||
+#endif
|
||||
php_mp_pack(str, data);
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE))
|
||||
+ GC_UNPROTECT_RECURSION(Z_ARRVAL_P(data));
|
||||
+#else
|
||||
if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)))
|
||||
Z_ARRVAL_P(data)->u.v.nApplyCount--;
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -408,14 +438,28 @@ size_t php_mp_sizeof_array_recursively(z
|
||||
for (; key_index < n; ++key_index) {
|
||||
data = zend_hash_index_find(ht, key_index);
|
||||
if (!data || data == val ||
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE) && GC_IS_RECURSIVE(Z_ARRVAL_P(data)))) {
|
||||
+#else
|
||||
(Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)) && Z_ARRVAL_P(data)->u.v.nApplyCount > 1)) {
|
||||
+#endif
|
||||
needed += php_mp_sizeof_nil();
|
||||
} else {
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE))
|
||||
+ GC_PROTECT_RECURSION(Z_ARRVAL_P(data));
|
||||
+#else
|
||||
if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)))
|
||||
Z_ARRVAL_P(data)->u.v.nApplyCount++;
|
||||
+#endif
|
||||
needed += php_mp_sizeof(data);
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE))
|
||||
+ GC_UNPROTECT_RECURSION(Z_ARRVAL_P(data));
|
||||
+#else
|
||||
if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)))
|
||||
Z_ARRVAL_P(data)->u.v.nApplyCount--;
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
return needed;
|
||||
@@ -452,14 +496,28 @@ size_t php_mp_sizeof_hash_recursively(zv
|
||||
}
|
||||
data = zend_hash_get_current_data_ex(ht, &pos);
|
||||
if (!data || data == val ||
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE) && GC_IS_RECURSIVE(Z_ARRVAL_P(data)))) {
|
||||
+#else
|
||||
(Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)) && Z_ARRVAL_P(data)->u.v.nApplyCount > 1)) {
|
||||
+#endif
|
||||
needed += php_mp_sizeof_nil();
|
||||
} else {
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE))
|
||||
+ GC_PROTECT_RECURSION(Z_ARRVAL_P(data));
|
||||
+#else
|
||||
if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)))
|
||||
Z_ARRVAL_P(data)->u.v.nApplyCount++;
|
||||
+#endif
|
||||
needed += php_mp_sizeof(data);
|
||||
+#if PHP_VERSION_ID >= 70300
|
||||
+ if (Z_TYPE_P(data) == IS_ARRAY && !(GC_FLAGS(Z_ARRVAL_P(data)) & GC_IMMUTABLE))
|
||||
+ GC_UNPROTECT_RECURSION(Z_ARRVAL_P(data));
|
||||
+#else
|
||||
if (Z_TYPE_P(data) == IS_ARRAY && ZEND_HASH_APPLY_PROTECTION(Z_ARRVAL_P(data)))
|
||||
Z_ARRVAL_P(data)->u.v.nApplyCount--;
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
return needed;
|
|
@ -1,13 +0,0 @@
|
|||
--- src/utils.c.orig 2018-04-18 13:33:56 UTC
|
||||
+++ src/utils.c
|
||||
@@ -29,8 +29,10 @@ const char *tutils_op_to_string(zval *ob
|
||||
return "RESOURCE";
|
||||
case(IS_REFERENCE):
|
||||
return "REFERENCE";
|
||||
+#if PHP_VERSION_ID < 70300
|
||||
case(IS_CONSTANT):
|
||||
return "CONSTANT";
|
||||
+#endif
|
||||
case(IS_CONSTANT_AST):
|
||||
return "CONSTANT_AST";
|
||||
case(IS_CALLABLE):
|
Loading…
Reference in a new issue