summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/helpers.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-12-27 22:09:55 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-12-27 22:09:55 (GMT)
commitc8dce9ce407b2f8248d669df196a4bf0f9523723 (patch)
treef7ea7baa0c83fb2de1ae8e402b342e345493cdc3 /plugins/pychrysalide/helpers.h
parent4b1367d2fee7be0789744e1db35d6f9200b29163 (diff)
Updated the logging features of the Python bindings.
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)