diff options
Diffstat (limited to 'ext/pdo_sqlite/sqlite/src/tokenize.c')
| -rw-r--r-- | ext/pdo_sqlite/sqlite/src/tokenize.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/pdo_sqlite/sqlite/src/tokenize.c b/ext/pdo_sqlite/sqlite/src/tokenize.c index fb1f6674df..578a60bda7 100644 --- a/ext/pdo_sqlite/sqlite/src/tokenize.c +++ b/ext/pdo_sqlite/sqlite/src/tokenize.c @@ -341,10 +341,10 @@ int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){ db->flags &= ~SQLITE_Interrupt; pParse->rc = SQLITE_OK; i = 0; - pEngine = sqlite3ParserAlloc((void*(*)(int))malloc); + pEngine = sqlite3ParserAlloc((void*(*)(int))sqlite3MallocX); if( pEngine==0 ){ sqlite3SetString(pzErrMsg, "out of memory", (char*)0); - return 1; + return SQLITE_NOMEM; } assert( pParse->sLastToken.dyn==0 ); assert( pParse->pNewTable==0 ); @@ -401,7 +401,7 @@ abort_parse: } sqlite3Parser(pEngine, 0, pParse->sLastToken, pParse); } - sqlite3ParserFree(pEngine, free); + sqlite3ParserFree(pEngine, sqlite3FreeX); if( sqlite3_malloc_failed ){ pParse->rc = SQLITE_NOMEM; } @@ -431,6 +431,11 @@ abort_parse: return nErr; } +/* The sqlite3_complete() API may be omitted (to save code space) by +** defining the following symbol. +*/ +#ifndef SQLITE_OMIT_COMPLETE + /* ** Token types used by the sqlite3_complete() routine. See the header ** comments on that procedure for additional information. @@ -662,3 +667,4 @@ int sqlite3_complete16(const void *zSql){ return rc; } #endif /* SQLITE_OMIT_UTF16 */ +#endif /* SQLITE_OMIT_COMPLETE */ |
