mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-26 12:45:20 +03:00
73 lines
2.3 KiB
Diff
73 lines
2.3 KiB
Diff
Patch-Source: https://github.com/igbinary/igbinary/pull/361
|
|
|
|
diff --git a/src/php7/igbinary.c b/src/php7/igbinary.c
|
|
index 91c982b..a657ce7 100644
|
|
--- a/src/php7/igbinary.c
|
|
+++ b/src/php7/igbinary.c
|
|
@@ -361,12 +361,8 @@ static const zend_module_dep igbinary_module_deps[] = {
|
|
|
|
/* {{{ igbinary_module_entry */
|
|
zend_module_entry igbinary_module_entry = {
|
|
-#if ZEND_MODULE_API_NO >= 20050922
|
|
STANDARD_MODULE_HEADER_EX, NULL,
|
|
igbinary_module_deps,
|
|
-#elif ZEND_MODULE_API_NO >= 20010901
|
|
- STANDARD_MODULE_HEADER,
|
|
-#endif
|
|
"igbinary",
|
|
igbinary_functions,
|
|
PHP_MINIT(igbinary),
|
|
@@ -374,9 +370,7 @@ zend_module_entry igbinary_module_entry = {
|
|
NULL,
|
|
NULL,
|
|
PHP_MINFO(igbinary),
|
|
-#if ZEND_MODULE_API_NO >= 20010901
|
|
- PHP_IGBINARY_VERSION, /* Replace with version number for your extension */
|
|
-#endif
|
|
+ PHP_IGBINARY_VERSION,
|
|
STANDARD_MODULE_PROPERTIES
|
|
};
|
|
/* }}} */
|
|
diff --git a/tests/igbinary_065.phpt b/tests/igbinary_065.phpt
|
|
index 5f0db11..40da635 100644
|
|
--- a/tests/igbinary_065.phpt
|
|
+++ b/tests/igbinary_065.phpt
|
|
@@ -2,7 +2,7 @@
|
|
Don't emit zval has unknown type 0 (IS_UNDEF)
|
|
--FILE--
|
|
<?php
|
|
-
|
|
+function var_export_normalized($value) { echo ltrim(var_export($value, true), "\\"); }
|
|
class MyClass {
|
|
public $kept = 2;
|
|
public $x;
|
|
@@ -27,7 +27,7 @@ error_reporting(E_ALL);
|
|
// TODO: emit 'Notice: igbinary_serialize(): "x" returned as member variable from __sleep() but does not exist' instead.
|
|
$serialized = igbinary_serialize(new MyClass());
|
|
echo bin2hex($serialized) . "\n";
|
|
-var_export(igbinary_unserialize($serialized));
|
|
+var_export_normalized(igbinary_unserialize($serialized));
|
|
echo "\n";
|
|
?>
|
|
--EXPECTF--
|
|
diff --git a/tests/igbinary_073.phpt b/tests/igbinary_073.phpt
|
|
index 419988b..e97b742 100644
|
|
--- a/tests/igbinary_073.phpt
|
|
+++ b/tests/igbinary_073.phpt
|
|
@@ -14,11 +14,14 @@ class Test implements Serializable {
|
|
$this->prop = $s;
|
|
}
|
|
}
|
|
+function var_export_normalized($value) {
|
|
+ echo ltrim(var_export($value, true), "\\");
|
|
+}
|
|
$t = new Test();
|
|
$t->prop = str_repeat('0', 256);
|
|
-var_export(bin2hex($s = igbinary_serialize($t)));
|
|
+var_export_normalized(bin2hex($s = igbinary_serialize($t)));
|
|
echo "\n";
|
|
-var_export(igbinary_unserialize($s));
|
|
+var_export_normalized(igbinary_unserialize($s));
|
|
echo "\n";
|
|
$t->prop = str_repeat('0', 1 << 16);
|
|
$t2 = igbinary_unserialize(igbinary_serialize($t));
|