chiark
/
gitweb
/
~mdw
/
pyke
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
747ddb1
)
*.c: Split the constant definitions into the various submodules.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 20 Oct 2019 22:18:09 +0000
(23:18 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 11 Apr 2020 11:44:14 +0000
(12:44 +0100)
pyke.h
patch
|
blob
|
blame
|
history
diff --git
a/pyke.h
b/pyke.h
index 138a9fbcc0123d232b9e3c4cbbb9587d0f618701..64608d9a1555974b426a90daea0e4da7fd8e57d3 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))