aboutsummaryrefslogtreecommitdiffstats
path: root/databases
diff options
context:
space:
mode:
Diffstat (limited to 'databases')
-rw-r--r--databases/php-xapian/files/patch-php7-php.i30
-rw-r--r--databases/php-xapian/files/patch-php7-php7-xapian_wrap.cc30
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