and the generated file

This commit is contained in:
Wez Furlong 2005-02-26 15:45:43 +00:00
parent b4ad599df2
commit 09fee0bf21

View File

@ -1,4 +1,4 @@
/* Generated by re2c 0.9.3 on Sun Feb 13 00:25:51 2005 */
/* Generated by re2c 0.9.3 on Sat Feb 26 10:44:39 2005 */
#line 1 "pdo_sql_parser.re"
/*
+----------------------------------------------------------------------+
@ -326,18 +326,38 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len,
ret = -1;
goto clean_up;
}
plc->freeq = 1;
} else {
convert_to_string(param->parameter);
if (!stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter),
Z_STRLEN_P(param->parameter), &plc->quoted, &plc->qlen,
param->param_type TSRMLS_CC)) {
/* bork */
ret = -1;
strcpy(stmt->error_code, stmt->dbh->error_code);
goto clean_up;
switch (Z_TYPE_P(param->parameter)) {
case IS_NULL:
plc->quoted = "NULL";
plc->qlen = sizeof("NULL")-1;
plc->freeq = 0;
break;
case IS_BOOL:
convert_to_long(param->parameter);
case IS_LONG:
case IS_DOUBLE:
convert_to_string(param->parameter);
plc->qlen = Z_STRLEN_P(param->parameter);
plc->quoted = Z_STRLEN_P(param->parameter);
plc->freeq = 0;
break;
default:
convert_to_string(param->parameter);
if (!stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter),
Z_STRLEN_P(param->parameter), &plc->quoted, &plc->qlen,
param->param_type TSRMLS_CC)) {
/* bork */
ret = -1;
strcpy(stmt->error_code, stmt->dbh->error_code);
goto clean_up;
}
plc->freeq = 1;
}
}
plc->freeq = 1;
} else {
plc->quoted = Z_STRVAL_P(param->parameter);
plc->qlen = Z_STRLEN_P(param->parameter);