summaryrefslogtreecommitdiffstats
path: root/Parser
diff options
context:
space:
mode:
Diffstat (limited to 'Parser')
-rw-r--r--Parser/pgenmain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Parser/pgenmain.c b/Parser/pgenmain.c
index e386248..fd927c0 100644
--- a/Parser/pgenmain.c
+++ b/Parser/pgenmain.c
@@ -21,10 +21,12 @@
#include "node.h"
#include "parsetok.h"
#include "pgen.h"
+#include "internal/_mem.h"
int Py_DebugFlag;
int Py_VerboseFlag;
int Py_IgnoreEnvironmentFlag;
+struct pyruntimestate _PyRuntime = {};
/* Forward */
grammar *getgrammar(const char *filename);
@@ -61,6 +63,8 @@ main(int argc, char **argv)
filename = argv[1];
graminit_h = argv[2];
graminit_c = argv[3];
+ _PyObject_Initialize(&_PyRuntime.obj);
+ _PyMem_Initialize(&_PyRuntime.mem);
g = getgrammar(filename);
fp = fopen(graminit_c, "w");
if (fp == NULL) {