summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/core/params.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysalide/core/params.c')
-rw-r--r--plugins/pychrysalide/core/params.c39
1 files changed, 2 insertions, 37 deletions
diff --git a/plugins/pychrysalide/core/params.c b/plugins/pychrysalide/core/params.c
index cb8c9f1..4a0513d 100644
--- a/plugins/pychrysalide/core/params.c
+++ b/plugins/pychrysalide/core/params.c
@@ -31,6 +31,7 @@
#include <core/params.h>
+#include "constants.h"
#include "../access.h"
#include "../helpers.h"
@@ -39,9 +40,6 @@
/* Fournit la version du programme global. */
static PyObject *py_params_get_main_configuration(PyObject *, PyObject *);
-/* Définit les constantes pour les paramètres. */
-static bool py_params_define_constants(PyObject *);
-
/******************************************************************************
@@ -84,35 +82,6 @@ static PyObject *py_params_get_main_configuration(PyObject *self, PyObject *args
/******************************************************************************
* *
-* Paramètres : dict = dictionnaire de module à compléter. *
-* *
-* Description : Définit les constantes pour les paramètres. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-static bool py_params_define_constants(PyObject *dict)
-{
- bool result; /* Bilan à retourner */
-
- result = true;
-
- result &= PyModDict_AddStringMacro(dict, MPK_LAST_PROJECT);
- result &= PyModDict_AddStringMacro(dict, MPK_ELLIPSIS_HEADER);
- result &= PyModDict_AddStringMacro(dict, MPK_ELLIPSIS_TAB);
- result &= PyModDict_AddStringMacro(dict, MPK_KEYBINDINGS_EDIT);
- result &= PyModDict_AddStringMacro(dict, MPK_AUTO_SAVE);
-
- return result;
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : - *
* *
* Description : Définit une extension du module 'core' à compléter. *
@@ -127,7 +96,6 @@ bool populate_core_module_with_params(void)
{
bool result; /* Bilan à retourner */
PyObject *module; /* Module à recompléter */
- PyObject *dict; /* Dictionnaire dudit module */
static PyMethodDef py_params_methods[] = {
PARAMS_GET_MAIN_CONFIGURATION_METHOD,
@@ -139,10 +107,7 @@ bool populate_core_module_with_params(void)
result = register_python_module_methods(module, py_params_methods);
if (result)
- {
- dict = PyModule_GetDict(module);
- result = py_params_define_constants(dict);
- }
+ define_core_params_constants(module);
return result;