From: Stanislav Malyshev Date: Mon, 19 Aug 2002 10:58:18 +0000 (+0000) Subject: ZE2 compatibility fix X-Git-Tag: RELEASE_0_91~398 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2282ac607485524945359d6b394018d89c9eb08f;p=php ZE2 compatibility fix ## In ZE2 the hash contains zend_class_entry *! --- diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c index 06a9320f08..857dc6d350 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -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;