chiark / gitweb /
catacomb-python.h (GEN): Remove `const' from input table type carefully.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 21 Oct 2019 12:07:43 +0000 (13:07 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 11 Apr 2020 11:44:14 +0000 (12:44 +0100)
We have this new machinery, so we should use it.

catacomb-python.h

index 6bae38a00a232a598195c9393d509bf8469e6642..4c7ced43c194e98d827b22d8b5da77314762691e 100644 (file)
@@ -145,7 +145,8 @@ extern int convmpw(PyObject *, void *);
     int i;                                                             \
                                                                        \
     for (i = 0; g##base##tab[i]; i++) {                                        \
-      o = gc##base##_pywrap((/*unconst*/ gc##base *)g##base##tab[i]);  \
+      o = gc##base##_pywrap(CONVERT_CAREFULLY(gc##base *, const gc##base *, \
+                                             g##base##tab[i]));        \
       PyDict_SetItemString(d,                                          \
                           (/*unconst*/ char *)g##base##tab[i]->name,   \
                           o);                                          \