summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/helpers.c
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.c
parent4b1367d2fee7be0789744e1db35d6f9200b29163 (diff)
Updated the logging features of the Python bindings.
Diffstat (limited to 'plugins/pychrysalide/helpers.c')
-rw-r--r--plugins/pychrysalide/helpers.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/pychrysalide/helpers.c b/plugins/pychrysalide/helpers.c
index 9237aba..ad62de4 100644
--- a/plugins/pychrysalide/helpers.c
+++ b/plugins/pychrysalide/helpers.c
@@ -208,9 +208,9 @@ PyObject *run_python_method(PyObject *module, const char *method, PyObject *args
/******************************************************************************
* *
-* Paramètres : obj_type = type dont le dictionnaire est à compléter. *
-* key = désignation de la constante à intégrer. *
-* value = valeur de la constante à intégrer. *
+* Paramètres : dict = dictionnaire à compléter. *
+* key = désignation de la constante à intégrer. *
+* value = valeur de la constante à intégrer. *
* *
* Description : Ajoute une constante au dictionnaire d'un type Python donné. *
* *
@@ -220,7 +220,7 @@ PyObject *run_python_method(PyObject *module, const char *method, PyObject *args
* *
******************************************************************************/
-bool PyDict_AddULongConstant(PyTypeObject *obj_type, const char *key, unsigned long value)
+bool PyDict_AddULongConstant(PyObject *dict, const char *key, unsigned long value)
{
bool result; /* Bilan à retourner */
PyObject *item; /* Nouvel élément à insérer */
@@ -228,7 +228,7 @@ bool PyDict_AddULongConstant(PyTypeObject *obj_type, const char *key, unsigned l
item = build_constval_from_c_code(key, value);
- ret = PyDict_SetItemString(obj_type->tp_dict, key, item);
+ ret = PyDict_SetItemString(dict, key, item);
result = (ret != -1);
Py_DECREF(item);
@@ -240,9 +240,9 @@ bool PyDict_AddULongConstant(PyTypeObject *obj_type, const char *key, unsigned l
/******************************************************************************
* *
-* Paramètres : obj_type = type dont le dictionnaire est à compléter. *
-* key = désignation de la constante à intégrer. *
-* value = valeur de la constante à intégrer. *
+* Paramètres : dict = dictionnaire à compléter. *
+* key = désignation de la constante à intégrer. *
+* value = valeur de la constante à intégrer. *
* *
* Description : Ajoute une constante au dictionnaire d'un type Python donné. *
* *
@@ -252,7 +252,7 @@ bool PyDict_AddULongConstant(PyTypeObject *obj_type, const char *key, unsigned l
* *
******************************************************************************/
-bool PyDict_AddStringConstant(PyTypeObject *obj_type, const char *key, const char *value)
+bool PyDict_AddStringConstant(PyObject *dict, const char *key, const char *value)
{
bool result; /* Bilan à retourner */
PyObject *item; /* Nouvel élément à insérer */
@@ -260,7 +260,7 @@ bool PyDict_AddStringConstant(PyTypeObject *obj_type, const char *key, const cha
item = PyUnicode_FromString(value);
- ret = PyDict_SetItemString(obj_type->tp_dict, key, item);
+ ret = PyDict_SetItemString(dict, key, item);
result = (ret != -1);
Py_DECREF(item);