diff options
Diffstat (limited to 'plugins/pychrysalide/helpers.c')
-rw-r--r-- | plugins/pychrysalide/helpers.c | 20 |
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); |