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:
aa34cb7
)
catacomb-python.h: Add a macro to declare module init functions.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 20 Oct 2019 17:18:05 +0000
(18:18 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 10 Apr 2020 21:42:39 +0000
(22:42 +0100)
catacomb-python.h
patch
|
blob
|
blame
|
history
diff --git
a/catacomb-python.h
b/catacomb-python.h
index 85adf7d1748090dc6b72616588130b9d8e8446e6..87bf36940bc4a619bf99300b1c6bcf9046faf08d 100644
(file)
--- a/
catacomb-python.h
+++ b/
catacomb-python.h
@@
-219,12
+219,11
@@
extern PyObject *modname;
#define DOMODINSERT(m) m##_pyinsert(mod);
#define INIT_MODULES do { MODULES(DOMODINIT) } while (0)
#define INSERT_MODULES do { MODULES(DOMODINSERT) } while (0)
-
-#define DO(m) \
+#define DECLARE_MODINIT(m) \
extern void m##_pyinit(void); \
extern void m##_pyinsert(PyObject *);
-MODULES(DO)
-#undef DO
+
+MODULES(DECLARE_MODINIT)
#define FREEOBJ(obj) \
(((PyObject *)(obj))->ob_type->tp_free((PyObject *)(obj)))