1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00

MFH: fix infinite cycle

#this was the infinite cycle that was bugging me in the gcov machine...
This commit is contained in:
Nuno Lopes
2007-01-03 22:05:24 +00:00
parent 7cf0e005fa
commit b6dff166bf
2 changed files with 8 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
/* Generated by re2c 0.10.6 on Mon Dec 4 16:21:45 2006 */
/* Generated by re2c 0.10.4 on Wed Jan 3 22:04:03 2007 */
#line 1 "ext/pdo/pdo_sql_parser.re"
/*
+----------------------------------------------------------------------+
@@ -31,14 +31,14 @@
#define RET(i) {s->cur = cursor; return i; }
#define YYCTYPE char
#define YYCTYPE unsigned char
#define YYCURSOR cursor
#define YYLIMIT s->lim
#define YYLIMIT cursor
#define YYMARKER s->ptr
#define YYFILL(n)
typedef struct Scanner {
char *lim, *ptr, *cur, *tok;
char *ptr, *cur, *tok;
} Scanner;
static int scan(Scanner *s)
@@ -263,7 +263,6 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len,
ptr = *outquery;
s.cur = inquery;
s.lim = inquery + inquery_len;
/* phase 1: look for args */
while((t = scan(&s)) != PDO_PARSER_EOI) {
@@ -578,7 +577,6 @@ int old_pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, char
ptr = *outquery;
s.cur = inquery;
s.lim = inquery + inquery_len;
while((t = scan(&s)) != PDO_PARSER_EOI) {
if(t == PDO_PARSER_TEXT) {
memcpy(ptr, s.tok, s.cur - s.tok);

View File

@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2006 The PHP Group |
| Copyright (c) 1997-2007 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -29,14 +29,14 @@
#define RET(i) {s->cur = cursor; return i; }
#define YYCTYPE char
#define YYCTYPE unsigned char
#define YYCURSOR cursor
#define YYLIMIT s->lim
#define YYLIMIT cursor
#define YYMARKER s->ptr
#define YYFILL(n)
typedef struct Scanner {
char *lim, *ptr, *cur, *tok;
char *ptr, *cur, *tok;
} Scanner;
static int scan(Scanner *s)
@@ -90,7 +90,6 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len,
ptr = *outquery;
s.cur = inquery;
s.lim = inquery + inquery_len;
/* phase 1: look for args */
while((t = scan(&s)) != PDO_PARSER_EOI) {
@@ -405,7 +404,6 @@ int old_pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, char
ptr = *outquery;
s.cur = inquery;
s.lim = inquery + inquery_len;
while((t = scan(&s)) != PDO_PARSER_EOI) {
if(t == PDO_PARSER_TEXT) {
memcpy(ptr, s.tok, s.cur - s.tok);