diff options
author | drh <drh@noemail.net> | 2014-09-12 04:28:33 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2014-09-12 04:28:33 +0000 |
commit | fb046e7653a1dee6e34b8b3b2ab71ebf0582de2c (patch) | |
tree | fb3a9adb371bec6788707315833658f9d611b541 /src | |
parent | fc59a954cbce32be71da37d7ca1f447396ba39e0 (diff) | |
download | sqlite-fb046e7653a1dee6e34b8b3b2ab71ebf0582de2c.tar.gz sqlite-fb046e7653a1dee6e34b8b3b2ab71ebf0582de2c.zip |
Fix a problem with parser memory allocation on 32-bit systems.
FossilOrigin-Name: 2f69a1fa6adc9377149ae7faa586a5d30b6a631b
Diffstat (limited to 'src')
-rw-r--r-- | src/lempar.c | 4 | ||||
-rw-r--r-- | src/sqliteInt.h | 2 | ||||
-rw-r--r-- | src/tokenize.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/lempar.c b/src/lempar.c index 2afaa6cea..ba0837c0a 100644 --- a/src/lempar.c +++ b/src/lempar.c @@ -271,9 +271,9 @@ static void yyGrowStack(yyParser *p){ ** A pointer to a parser. This pointer is used in subsequent calls ** to Parse and ParseFree. */ -void *ParseAlloc(void *(*mallocProc)(size_t)){ +void *ParseAlloc(void *(*mallocProc)(u64)){ yyParser *pParser; - pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) ); + pParser = (yyParser*)(*mallocProc)( (u64)sizeof(yyParser) ); if( pParser ){ pParser->yyidx = -1; #ifdef YYTRACKMAXSTACKDEPTH diff --git a/src/sqliteInt.h b/src/sqliteInt.h index e1faccb21..a254796ab 100644 --- a/src/sqliteInt.h +++ b/src/sqliteInt.h @@ -3520,7 +3520,7 @@ int sqlite3Stat4Column(sqlite3*, const void*, int, int, sqlite3_value**); /* ** The interface to the LEMON-generated parser */ -void *sqlite3ParserAlloc(void*(*)(size_t)); +void *sqlite3ParserAlloc(void*(*)(u64)); void sqlite3ParserFree(void*, void(*)(void*)); void sqlite3Parser(void*, int, Token, Parse*); #ifdef YYTRACKMAXSTACKDEPTH diff --git a/src/tokenize.c b/src/tokenize.c index 3f1de221a..8a7894514 100644 --- a/src/tokenize.c +++ b/src/tokenize.c @@ -398,7 +398,7 @@ int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){ pParse->zTail = zSql; i = 0; assert( pzErrMsg!=0 ); - pEngine = sqlite3ParserAlloc((void*(*)(size_t))sqlite3Malloc); + pEngine = sqlite3ParserAlloc(sqlite3Malloc); if( pEngine==0 ){ db->mallocFailed = 1; return SQLITE_NOMEM; |