*.c: Split the constant definitions into the various submodules.
[pyke] / pyke.h
diff --git a/pyke.h b/pyke.h
index 138a9fb..64608d9 100644 (file)
--- a/pyke.h
+++ b/pyke.h
@@ -321,6 +321,8 @@ extern PyObject *mkexc(PyObject */*mod*/, PyObject */*base*/,
 struct nameval { const char *name; unsigned f; unsigned long value; };
 #define CF_SIGNED 1u
 extern void setconstants(PyObject *, const struct nameval *);
+#define CONST(x) { #x, (x) >= 0 ? 0 : CF_SIGNED, x }
+#define CONSTFLAG(f, x) { #x, f, x }
 
 #define INSEXC(name, var, base, meth)                                  \
   INSERT(name, var = mkexc(mod, base, name, meth))