]> granicus.if.org Git - php/commitdiff
ZE2 compatibility fix
authorStanislav Malyshev <stas@php.net>
Mon, 19 Aug 2002 10:58:18 +0000 (10:58 +0000)
committerStanislav Malyshev <stas@php.net>
Mon, 19 Aug 2002 10:58:18 +0000 (10:58 +0000)
## In ZE2 the hash contains zend_class_entry *!

ext/standard/var_unserializer.c

index 06a9320f08f67defd1abeed8c64bae47740bf19c..857dc6d35070eb81b4258829791aa05e0f2a2199 100644 (file)
@@ -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 @@ yy3:        yyaccept = 0;
        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 @@ yy12:       yyaccept = 0;
        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 @@ yy22:
                                        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 @@ yy80:
        return 1;
 }
 }
-#line 406
+#line 412
 
 
        return 0;