aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lemon/lempar.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2008-03-23 08:58:52 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2008-03-23 08:58:52 +0000
commit098d297303a95c81df10542f56b8c591532cc07a (patch)
tree7e406e4f58ef201f51b1bb57f0349d489635cea5 /tools/lemon/lempar.c
parente843df87f66a62a4e8f604fca6361d031001fa77 (diff)
Running glib 2.16 on 32 bit platform requires this lempar.c change in addition to revision 24710.
Makefiles updated to make new lempar.c effective in build rules. svn path=/trunk/; revision=24718
Diffstat (limited to 'tools/lemon/lempar.c')
-rw-r--r--tools/lemon/lempar.c6
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;
}