summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/helpers.h')
-rw-r--r--plugins/pychrysalide/helpers.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/pychrysalide/helpers.h b/plugins/pychrysalide/helpers.h
index c31c7ad..e080ca4 100644
--- a/plugins/pychrysalide/helpers.h
+++ b/plugins/pychrysalide/helpers.h
@@ -47,14 +47,17 @@ PyObject *_run_python_method(PyObject *, PyObject *);
PyObject *run_python_method(PyObject *, const char *, PyObject *);
/* Ajoute une constante au dictionnaire d'un type Python donné. */
-bool PyDict_AddULongConstant(PyTypeObject *, const char *, unsigned long);
+bool PyDict_AddULongConstant(PyObject *, const char *, unsigned long);
/* Ajoute une constante au dictionnaire d'un type Python donné. */
-bool PyDict_AddStringConstant(PyTypeObject *, const char *, const char *);
+bool PyDict_AddStringConstant(PyObject *, const char *, const char *);
-#define PyDict_AddULongMacro(tp, c) PyDict_AddULongConstant(tp, #c, c)
-#define PyDict_AddStringMacro(tp, c) PyDict_AddStringConstant(tp, #c, c)
+#define PyDict_AddULongMacro(tp, c) PyDict_AddULongConstant(tp->tp_dict, #c, c)
+#define PyDict_AddStringMacro(tp, c) PyDict_AddStringConstant(tp->tp_dict, #c, c)
+
+#define PyModDict_AddULongMacro(d, c) PyDict_AddULongConstant(d, #c, c)
+#define PyModDict_AddStringMacro(d, c) PyDict_AddStringConstant(d, #c, c)