diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-02-15 06:22:46 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-02-15 06:22:46 +0000 |
commit | 352eec3037544f39f2534903fc5a1ec31bbf061f (patch) | |
tree | c7dfa49f7b18fc65e5a1230797e8cdcdd440f39e /tools/lemon/lempar.c | |
parent | 6eaa148b30eaa1e739caec78eee0374d0688eb35 (diff) |
More prototype fun - make the Lemon parser allocate and free routines
take fully-prototyped function arguments with types appropriate to
"g_malloc()" and "g_free()", and change the calls to the functions
pointed to by those arguments not pass the extra __FILE__ and __LINE__
arguments.
svn path=/trunk/; revision=3039
Diffstat (limited to 'tools/lemon/lempar.c')
-rw-r--r-- | tools/lemon/lempar.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/lemon/lempar.c b/tools/lemon/lempar.c index 73783a3d35..bee6c33eb4 100644 --- a/tools/lemon/lempar.c +++ b/tools/lemon/lempar.c @@ -202,9 +202,9 @@ static char *yyTokenName[] = { ** A pointer to a parser. This pointer is used in subsequent calls ** to Parse and ParseFree. */ -void *ParseAlloc(void *(*mallocProc)()){ +void *ParseAlloc(void *(*mallocProc)(gulong)){ yyParser *pParser; - pParser = (yyParser*)(*mallocProc)( sizeof(yyParser), __FILE__, __LINE__ ); + pParser = (yyParser*)(*mallocProc)( sizeof(yyParser) ); if( pParser ){ pParser->idx = -1; } @@ -272,13 +272,13 @@ static int yy_pop_parser_stack(yyParser *pParser){ ** </ul> */ void ParseFree( - void *p, /* The parser to be deleted */ - void (*freeProc)() /* Function used to reclaim memory */ + void *p, /* The parser to be deleted */ + void (*freeProc)(void *) /* Function used to reclaim memory */ ){ yyParser *pParser = (yyParser*)p; if( pParser==0 ) return; while( pParser->idx>=0 ) yy_pop_parser_stack(pParser); - (*freeProc)(pParser, __FILE__, __LINE__); + (*freeProc)(pParser); } /* |