*.c: Split the constant definitions into the various submodules.
[catacomb-python] / ec.c
diff --git a/ec.c b/ec.c
index b958d53..759ac57 100644 (file)
--- a/ec.c
+++ b/ec.c
@@ -1543,6 +1543,12 @@ static const PyTypeObject ecinfo_pytype_skel = {
 
 /*----- Setup -------------------------------------------------------------*/
 
+static const struct nameval consts[] = {
+  CONST(EC_XONLY), CONST(EC_YBIT), CONST(EC_LSB),
+  CONST(EC_CMPR), CONST(EC_EXPLY), CONST(EC_SORT),
+  { 0 }
+};
+
 void ec_pyinit(void)
 {
   INITTYPE(ecpt, root);
@@ -1591,6 +1597,7 @@ void ec_pyinsert(PyObject *mod)
   INSERT("ECBinProjCurve", ecbinprojcurve_pytype);
   INSERT("ECInfo", ecinfo_pytype);
   INSERT("_eccurves", namedcurves());
+  setconstants(mod, consts);
 }
 
 /*----- That's all, folks -------------------------------------------------*/