From: Mark Wooding Date: Sun, 20 Oct 2019 22:18:09 +0000 (+0100) Subject: *.c: Split the constant definitions into the various submodules. X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb-python/commitdiff_plain/dcb7c3db40da27d9cea69b0c8b128cd9f622cdf7 *.c: Split the constant definitions into the various submodules. --- diff --git a/pyke.h b/pyke.h index 138a9fb..a544f8d 100644 --- 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, 0, x } +#define CONSTFLAG(f, x) { #x, f, x } #define INSEXC(name, var, base, meth) \ INSERT(name, var = mkexc(mod, base, name, meth))