cvs: php4 /ext/standard var_unserializer.c
| From: | Stanislav Malyshev | Date: | Mon, 19 Aug 2002 10:58:18 +0000 |
| Subject: | cvs: php4 /ext/standard var_unserializer.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-13458@lists.php.net to get a copy of this message | ||
stas Mon Aug 19 06:58:18 2002 EDT
Modified files:
/php4/ext/standard var_unserializer.c
Log:
ZE2 compatibility fix
## In ZE2 the hash contains zend_class_entry *!
Index: php4/ext/standard/var_unserializer.c
diff -u php4/ext/standard/var_unserializer.c:1.16 php4/ext/standard/var_unserializer.c:1.17
--- php4/ext/standard/var_unserializer.c:1.16 Mon Aug 5 20:07:05 2002
+++ php4/ext/standard/var_unserializer.c Mon Aug 19 06:58:18 2002
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.5 on Sun Apr 28 19:47:31 2002 */
+/* Generated by re2c 0.5 on Sun Aug 18 15:18:22 2002 */
#line 1 "var_unserializer.re"
#include "php.h"
#include "ext/standard/php_var.h"
@@ -319,7 +319,7 @@
yych = *(YYMARKER = ++YYCURSOR);
if(yych == ':') goto yy75;
yy4:
-#line 404
+#line 410
{ return 0; }
yy5: yych = *++YYCURSOR;
if(yych == ';') goto yy73;
@@ -354,7 +354,7 @@
goto yy4;
yy13: yych = *++YYCURSOR;
yy14:
-#line 398
+#line 404
{
/* this is the case where we have less data than planned */
zend_error(E_NOTICE, "Unexpected end of serialized data");
@@ -427,12 +427,20 @@
zend_error(E_WARNING, "'unserialize_callback_func' (%s) hasn't defined the
class it was called for", user_func->value.str.val);
incomplete_class = 1;
ce = PHP_IC_ENTRY;
- } else
+ } else {
+#ifdef ZEND_ENGINE_2
+ ce = *(zend_class_entry **)ce; /* Bad hack, TBF! */
+#endif
efree(class_name);
+ }
}
}
- } else
+ } else {
+#ifdef ZEND_ENGINE_2
+ ce = *(zend_class_entry **)ce; /* Bad hack, TBF! */
+#endif
efree(class_name);
+ }
*p = YYCURSOR;
elements = object_common1(UNSERIALIZE_PASSTHRU, ce);
@@ -761,7 +769,7 @@
return 1;
}
}
-#line 406
+#line 412
return 0;