*.c: Split the constant definitions into the various submodules.
[catacomb-python] / pgen.c
diff --git a/pgen.c b/pgen.c
index 6bbfd82..291d289 100644 (file)
--- a/pgen.c
+++ b/pgen.c
@@ -1051,6 +1051,12 @@ end:
 
 /*----- Global stuff ------------------------------------------------------*/
 
+static const struct nameval consts[] = {
+  CONST(PGEN_PASS), CONST(PGEN_FAIL), CONST(PGEN_BEGIN), CONST(PGEN_TRY),
+  CONST(PGEN_DONE), CONST(PGEN_ABORT),
+  { 0 }
+};
+
 static const PyMethodDef methods[] = {
 #define METHNAME(name) meth_##name
   KWMETH(pgen,
@@ -1098,6 +1104,7 @@ void pgen_pyinsert(PyObject *mod)
   INSERT("pgen_stdev", pgev_stdev(pgen_ev));
   INSERT("pgen_spinev", pgev_stdev(pgen_evspin));
   INSERT("pgen_subev", pgev_stdev(pgen_subev));
+  setconstants(mod, consts);
 }
 
 /*----- That's all, folks -------------------------------------------------*/