felipe Fri, 24 Jun 2011 00:38:53 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=312425
Log: - Fixed build on Windows Changed paths: U php/php-src/branches/PHP_5_4/Zend/zend_language_parser.y U php/php-src/trunk/Zend/zend_language_parser.y Modified: php/php-src/branches/PHP_5_4/Zend/zend_language_parser.y =================================================================== --- php/php-src/branches/PHP_5_4/Zend/zend_language_parser.y 2011-06-23 23:00:53 UTC (rev 312424) +++ php/php-src/branches/PHP_5_4/Zend/zend_language_parser.y 2011-06-24 00:38:53 UTC (rev 312425) @@ -1150,7 +1150,8 @@ { TSRMLS_FETCH(); if (CG(parse_error) == 0) { - char buffer[120], *end, *str, *tok1 = NULL, *tok2 = NULL; + char buffer[120]; + const unsigned char *end, *str, *tok1 = NULL, *tok2 = NULL; unsigned int len = 0, toklen = 0, yystr_len; CG(parse_error) = 1; @@ -1158,7 +1159,8 @@ if (LANG_SCNG(yy_text)[0] == 0 && LANG_SCNG(yy_leng) == 1 && memcmp(yystr, ZEND_STRL("\"end of file\"")) == 0) { - return yystpcpy(yyres, "end of file") - yyres; + yystpcpy(yyres, "end of file"); + return sizeof("end of file")-1; } str = LANG_SCNG(yy_text); @@ -1183,7 +1185,8 @@ } else { snprintf(buffer, sizeof(buffer), "'%.*s'", len, str); } - return yystpcpy(yyres, buffer) - yyres; + yystpcpy(yyres, buffer); + return len + (toklen ? toklen + 1 : 0) + 2; } } if (*yystr == '"') { @@ -1196,7 +1199,8 @@ yyres[yyn] = '\0'; return yyn; } - return yystpcpy(yyres, yystr) - yyres; + yystpcpy(yyres, yystr); + return strlen(yystr); } /* Modified: php/php-src/trunk/Zend/zend_language_parser.y =================================================================== --- php/php-src/trunk/Zend/zend_language_parser.y 2011-06-23 23:00:53 UTC (rev 312424) +++ php/php-src/trunk/Zend/zend_language_parser.y 2011-06-24 00:38:53 UTC (rev 312425) @@ -1150,7 +1150,8 @@ { TSRMLS_FETCH(); if (CG(parse_error) == 0) { - char buffer[120], *end, *str, *tok1 = NULL, *tok2 = NULL; + char buffer[120]; + const unsigned char *end, *str, *tok1 = NULL, *tok2 = NULL; unsigned int len = 0, toklen = 0, yystr_len; CG(parse_error) = 1; @@ -1158,7 +1159,8 @@ if (LANG_SCNG(yy_text)[0] == 0 && LANG_SCNG(yy_leng) == 1 && memcmp(yystr, ZEND_STRL("\"end of file\"")) == 0) { - return yystpcpy(yyres, "end of file") - yyres; + yystpcpy(yyres, "end of file"); + return sizeof("end of file")-1; } str = LANG_SCNG(yy_text); @@ -1183,7 +1185,8 @@ } else { snprintf(buffer, sizeof(buffer), "'%.*s'", len, str); } - return yystpcpy(yyres, buffer) - yyres; + yystpcpy(yyres, buffer); + return len + (toklen ? toklen + 1 : 0) + 2; } } if (*yystr == '"') { @@ -1196,7 +1199,8 @@ yyres[yyn] = '\0'; return yyn; } - return yystpcpy(yyres, yystr) - yyres; + yystpcpy(yyres, yystr); + return strlen(yystr); } /*
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php