diff options
Diffstat (limited to 'Parser/pgenmain.c')
-rw-r--r-- | Parser/pgenmain.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c index 0f055d6..e386248 100644 --- a/Parser/pgenmain.c +++ b/Parser/pgenmain.c @@ -27,7 +27,7 @@ int Py_VerboseFlag; int Py_IgnoreEnvironmentFlag; /* Forward */ -grammar *getgrammar(char *filename); +grammar *getgrammar(const char *filename); void Py_Exit(int) _Py_NO_RETURN; @@ -37,6 +37,15 @@ Py_Exit(int sts) exit(sts); } +#ifdef WITH_THREAD +/* Needed by obmalloc.c */ +int PyGILState_Check(void) +{ return 1; } +#endif + +void _PyMem_DumpTraceback(int fd, const void *ptr) +{} + int main(int argc, char **argv) { @@ -71,12 +80,13 @@ main(int argc, char **argv) printf("Writing %s ...\n", graminit_h); printnonterminals(g, fp); fclose(fp); + freegrammar(g); Py_Exit(0); return 0; /* Make gcc -Wall happy */ } grammar * -getgrammar(char *filename) +getgrammar(const char *filename) { FILE *fp; node *n; |