-/* Generated by re2c 1.0.3 */
+/* Generated by re2c 1.0.1 */
#line 1 "ext/standard/var_unserializer.re"
/*
+----------------------------------------------------------------------+
#define YYMARKER marker
-#line 325 "ext/standard/var_unserializer.re"
+#line 323 "ext/standard/var_unserializer.re"
|| (SIZEOF_ZEND_LONG == 4
&& UNEXPECTED(p - start == MAX_LENGTH_OF_LONG - 1)
&& UNEXPECTED(*start > '2'))
- || UNEXPECTED(result - neg > ZEND_LONG_MAX)) {
+ || UNEXPECTED(result > ZEND_LONG_MAX + neg)) {
php_error_docref(NULL, E_WARNING, "Numerical result out of range");
return (!neg) ? ZEND_LONG_MAX : ZEND_LONG_MIN;
}
- return (!neg) ? (zend_long)result : -(zend_long)result;
+ return (zend_long) ((!neg) ? result : -result);
}
static inline zend_long parse_iv(const unsigned char *p)
start = cursor;
-#line 679 "ext/standard/var_unserializer.c"
+#line 677 "ext/standard/var_unserializer.c"
{
YYCTYPE yych;
static const unsigned char yybm[] = {
yy2:
++YYCURSOR;
yy3:
-#line 1078 "ext/standard/var_unserializer.re"
+#line 1076 "ext/standard/var_unserializer.re"
{ return 0; }
-#line 739 "ext/standard/var_unserializer.c"
+#line 737 "ext/standard/var_unserializer.c"
yy4:
yych = *(YYMARKER = ++YYCURSOR);
if (yych == ':') goto yy17;
goto yy3;
yy15:
++YYCURSOR;
-#line 1072 "ext/standard/var_unserializer.re"
+#line 1070 "ext/standard/var_unserializer.re"
{
/* this is the case where we have less data than planned */
php_error_docref(NULL, E_NOTICE, "Unexpected end of serialized data");
return 0; /* not sure if it should be 0 or 1 here? */
}
-#line 792 "ext/standard/var_unserializer.c"
+#line 790 "ext/standard/var_unserializer.c"
yy17:
yych = *++YYCURSOR;
if (yybm[0+yych] & 128) {
goto yy3;
yy19:
++YYCURSOR;
-#line 733 "ext/standard/var_unserializer.re"
+#line 731 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
ZVAL_NULL(rval);
return 1;
}
-#line 809 "ext/standard/var_unserializer.c"
+#line 807 "ext/standard/var_unserializer.c"
yy21:
yych = *++YYCURSOR;
if (yych <= '/') goto yy18;
goto yy18;
yy57:
++YYCURSOR;
-#line 683 "ext/standard/var_unserializer.re"
+#line 681 "ext/standard/var_unserializer.re"
{
zend_long id;
return 1;
}
-#line 1038 "ext/standard/var_unserializer.c"
+#line 1036 "ext/standard/var_unserializer.c"
yy59:
yych = *++YYCURSOR;
if (yych == '"') goto yy80;
goto yy18;
yy61:
++YYCURSOR;
-#line 739 "ext/standard/var_unserializer.re"
+#line 737 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
ZVAL_FALSE(rval);
return 1;
}
-#line 1055 "ext/standard/var_unserializer.c"
+#line 1053 "ext/standard/var_unserializer.c"
yy63:
++YYCURSOR;
-#line 745 "ext/standard/var_unserializer.re"
+#line 743 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
ZVAL_TRUE(rval);
return 1;
}
-#line 1064 "ext/standard/var_unserializer.c"
+#line 1062 "ext/standard/var_unserializer.c"
yy65:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
}
yy67:
++YYCURSOR;
-#line 793 "ext/standard/var_unserializer.re"
+#line 791 "ext/standard/var_unserializer.re"
{
#if SIZEOF_ZEND_LONG == 4
use_double:
ZVAL_DOUBLE(rval, zend_strtod((const char *)start + 2, NULL));
return 1;
}
-#line 1093 "ext/standard/var_unserializer.c"
+#line 1091 "ext/standard/var_unserializer.c"
yy69:
yych = *++YYCURSOR;
if (yych <= ',') {
goto yy18;
yy72:
++YYCURSOR;
-#line 751 "ext/standard/var_unserializer.re"
+#line 749 "ext/standard/var_unserializer.re"
{
#if SIZEOF_ZEND_LONG == 4
int digits = YYCURSOR - start - 3;
ZVAL_LONG(rval, parse_iv(start + 2));
return 1;
}
-#line 1141 "ext/standard/var_unserializer.c"
+#line 1139 "ext/standard/var_unserializer.c"
yy74:
yych = *++YYCURSOR;
if (yych == '"') goto yy88;
goto yy18;
yy75:
++YYCURSOR;
-#line 708 "ext/standard/var_unserializer.re"
+#line 706 "ext/standard/var_unserializer.re"
{
zend_long id;
return 1;
}
-#line 1173 "ext/standard/var_unserializer.c"
+#line 1171 "ext/standard/var_unserializer.c"
yy77:
yych = *++YYCURSOR;
if (yych == '"') goto yy90;
goto yy18;
yy78:
++YYCURSOR;
-#line 920 "ext/standard/var_unserializer.re"
+#line 918 "ext/standard/var_unserializer.re"
{
size_t len, len2, len3, maxlen;
zend_long elements;
return object_common2(UNSERIALIZE_PASSTHRU, elements);
}
-#line 1332 "ext/standard/var_unserializer.c"
+#line 1330 "ext/standard/var_unserializer.c"
yy80:
++YYCURSOR;
-#line 842 "ext/standard/var_unserializer.re"
+#line 840 "ext/standard/var_unserializer.re"
{
size_t len, maxlen;
zend_string *str;
ZVAL_STR(rval, str);
return 1;
}
-#line 1369 "ext/standard/var_unserializer.c"
+#line 1367 "ext/standard/var_unserializer.c"
yy82:
++YYCURSOR;
-#line 876 "ext/standard/var_unserializer.re"
+#line 874 "ext/standard/var_unserializer.re"
{
zend_long elements = parse_iv(start + 2);
/* use iv() not uiv() in order to check data range */
return finish_nested_data(UNSERIALIZE_PASSTHRU);
}
-#line 1405 "ext/standard/var_unserializer.c"
+#line 1403 "ext/standard/var_unserializer.c"
yy84:
yych = *++YYCURSOR;
if (yych <= '/') goto yy18;
goto yy18;
yy88:
++YYCURSOR;
-#line 909 "ext/standard/var_unserializer.re"
+#line 907 "ext/standard/var_unserializer.re"
{
zend_long elements;
if (!var_hash) return 0;
}
return object_common2(UNSERIALIZE_PASSTHRU, elements);
}
-#line 1435 "ext/standard/var_unserializer.c"
+#line 1433 "ext/standard/var_unserializer.c"
yy90:
++YYCURSOR;
-#line 802 "ext/standard/var_unserializer.re"
+#line 800 "ext/standard/var_unserializer.re"
{
size_t len, maxlen;
char *str;
}
return 1;
}
-#line 1478 "ext/standard/var_unserializer.c"
+#line 1476 "ext/standard/var_unserializer.c"
yy92:
++YYCURSOR;
-#line 777 "ext/standard/var_unserializer.re"
+#line 775 "ext/standard/var_unserializer.re"
{
*p = YYCURSOR;
return 1;
}
-#line 1497 "ext/standard/var_unserializer.c"
+#line 1495 "ext/standard/var_unserializer.c"
}
-#line 1080 "ext/standard/var_unserializer.re"
+#line 1078 "ext/standard/var_unserializer.re"
return 0;