diff options
author | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2018-10-29 22:12:24 +0000 |
---|---|---|
committer | Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> | 2018-10-29 22:12:24 +0000 |
commit | 1d4a7aff355bcb3ccbc9aa409c9da9a1e999af1c (patch) | |
tree | 546ce6f11febf1c8597e89759c8ff765406351a5 /databases/php-xapian | |
parent | cac15022e2503a91eda4fabb62e1bd9a0debda8e (diff) | |
download | ports-1d4a7aff355bcb3ccbc9aa409c9da9a1e999af1c.tar.gz ports-1d4a7aff355bcb3ccbc9aa409c9da9a1e999af1c.zip |
Notes
Diffstat (limited to 'databases/php-xapian')
-rw-r--r-- | databases/php-xapian/files/patch-php7-php.i | 30 | ||||
-rw-r--r-- | databases/php-xapian/files/patch-php7-php7-xapian_wrap.cc | 30 |
2 files changed, 60 insertions, 0 deletions
diff --git a/databases/php-xapian/files/patch-php7-php.i b/databases/php-xapian/files/patch-php7-php.i new file mode 100644 index 000000000000..3f7922835c17 --- /dev/null +++ b/databases/php-xapian/files/patch-php7-php.i @@ -0,0 +1,30 @@ +--- php7/php.i.orig 2018-10-26 05:08:02 UTC ++++ php7/php.i +@@ -177,9 +177,13 @@ fail: // Label which SWIG_PHP_Error need + %typemap(out) std::pair<Xapian::TermIterator, Xapian::TermIterator> { + + ZVAL_NEW_ARR($result); ++#if PHP_VERSION_ID >= 70300 ++ array_init($result); ++#else + if (array_init($result) == FAILURE) { + SWIG_PHP_Error(E_ERROR, "array_init failed"); + } ++#endif + + for (Xapian::TermIterator i = $1.first; i != $1.second; ++i) { + /* We have to cast away const here because the PHP API is rather +@@ -198,9 +202,13 @@ fail: // Label which SWIG_PHP_Error need + + %typemap(directorin) (size_t num_tags, const std::string tags[]) { + ZVAL_NEW_ARR($input); ++#if PHP_VERSION_ID >= 70300 ++ array_init($input); ++#else + if (array_init($input) == FAILURE) { + SWIG_PHP_Error(E_ERROR, "array_init failed"); + } ++#endif + + for (size_t i = 0; i != num_tags; ++i) { + const string & term = tags[i]; diff --git a/databases/php-xapian/files/patch-php7-php7-xapian_wrap.cc b/databases/php-xapian/files/patch-php7-php7-xapian_wrap.cc new file mode 100644 index 000000000000..c4d981e6a2a0 --- /dev/null +++ b/databases/php-xapian/files/patch-php7-php7-xapian_wrap.cc @@ -0,0 +1,30 @@ +--- php7/php7/xapian_wrap.cc.orig 2018-10-26 05:12:41 UTC ++++ php7/php7/xapian_wrap.cc +@@ -2533,9 +2533,13 @@ std::string SwigDirector_Compactor::reso + + { + ZVAL_NEW_ARR(&args[1]); ++#if PHP_VERSION_ID >= 70300 ++ array_init(&args[1]); ++#else + if (array_init(&args[1]) == FAILURE) { + SWIG_PHP_Error(E_ERROR, "array_init failed"); + } ++#endif + + for (size_t i = 0; i != num_tags; ++i) { + const string & term = tags[i]; +@@ -16756,9 +16760,13 @@ ZEND_NAMED_FUNCTION(_wrap_Enquire_get_ma + } + { + ZVAL_NEW_ARR(return_value); ++#if PHP_VERSION_ID >= 70300 ++ array_init(return_value); ++#else + if (array_init(return_value) == FAILURE) { + SWIG_PHP_Error(E_ERROR, "array_init failed"); + } ++#endif + + for (Xapian::TermIterator i = (&result)->first; i != (&result)->second; ++i) { + /* We have to cast away const here because the PHP API is rather |