diff options
Diffstat (limited to 'plugins/pychrysalide/core/params.c')
-rw-r--r-- | plugins/pychrysalide/core/params.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/plugins/pychrysalide/core/params.c b/plugins/pychrysalide/core/params.c index b9d8741..0f23981 100644 --- a/plugins/pychrysalide/core/params.c +++ b/plugins/pychrysalide/core/params.c @@ -62,6 +62,16 @@ static PyObject *py_params_get_main_configuration(PyObject *self, PyObject *args PyObject *result; /* Instance GLib à retourner */ GGenConfig *config; /* Configuration à convertir */ +#define PARAMS_GET_MAIN_CONFIGURATION_METHOD PYTHON_METHOD_DEF \ +( \ + get_main_configuration, "", \ + METH_NOARGS, py_params, \ + "Give access to the main configuration of Chrysalide." \ + "\n" \ + "The returned object is an instance of type" \ + " pychrysalide.glibext.GenConfig." \ +) + config = get_main_configuration(); result = pygobject_new(G_OBJECT(config)); @@ -120,13 +130,8 @@ bool populate_core_module_with_params(void) PyObject *dict; /* Dictionnaire dudit module */ static PyMethodDef py_params_methods[] = { - - { "get_main_configuration", py_params_get_main_configuration, - METH_NOARGS, - "get_main_configuration(, /)\n--\n\nGive access to the main configuration of Chrysalide." - }, + PARAMS_GET_MAIN_CONFIGURATION_METHOD, { NULL } - }; module = get_access_to_python_module("pychrysalide.core"); |