[dev-libs/Ice] added a patch for db6 from pld, also include php 7.1 fix from upstream so i don't forget it later in case we have no 3.6.4 soon-ish

This commit is contained in:
2017-07-09 00:27:53 +02:00
parent aa8c4cc6f1
commit fa1f3e73e0
3 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
--- ice-3.6.3/php/src/php7/Types.cpp.orig 2016-10-05 16:59:08.000000000 +0200
+++ ice-3.6.3/php/src/php7/Types.cpp 2017-06-30 20:05:36.233173124 +0200
@@ -1166,26 +1166,7 @@
{
assert(Z_TYPE_P(target) == IS_OBJECT);
- //
- // The add_property_zval function fails if the data member has protected visibility.
- // As a workaround, before calling the function we change the current scope to be that
- // of the object.
- //
- zend_class_entry *oldScope = EG(scope);
- EG(scope) = Z_OBJCE_P(target);
-
- //
- // add_property_zval increments the refcount of zv.
- //
- int status = add_property_zval(target, STRCAST(name.c_str()), zv);
-
- EG(scope) = oldScope; // Restore the previous scope.
-
- if(status == FAILURE)
- {
- runtimeError("unable to set member `%s'", name.c_str());
- throw AbortMarshaling();
- }
+ zend_update_property(Z_OBJCE_P(target), target, STRCAST(name.c_str()), strlen(name.c_str()), zv);
}
static void