diff options
Diffstat (limited to 'tools/lemon')
-rw-r--r-- | tools/lemon/lempar.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/lemon/lempar.c b/tools/lemon/lempar.c index aaa7a8d2a5..97074b5635 100644 --- a/tools/lemon/lempar.c +++ b/tools/lemon/lempar.c @@ -252,9 +252,15 @@ const char *ParseTokenName(int tokenType){ ** A pointer to a parser. This pointer is used in subsequent calls ** to Parse and ParseFree. */ +#if (GLIB_MAJOR_VERSION > 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION >= 16)) +void *ParseAlloc(void *(*mallocProc)(gsize)){ + yyParser *pParser; + pParser = (yyParser*)(*mallocProc)( (gsize)sizeof(yyParser) ); +#else void *ParseAlloc(void *(*mallocProc)(gulong)){ yyParser *pParser; pParser = (yyParser*)(*mallocProc)( (gulong)sizeof(yyParser) ); +#endif if( pParser ){ pParser->yyidx = -1; } |