diff options
Diffstat (limited to 'plugins/pychrysalide/helpers.h')
-rw-r--r-- | plugins/pychrysalide/helpers.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/pychrysalide/helpers.h b/plugins/pychrysalide/helpers.h index c3ae535..f2a9a1d 100644 --- a/plugins/pychrysalide/helpers.h +++ b/plugins/pychrysalide/helpers.h @@ -124,6 +124,14 @@ bool register_python_module_object(PyObject *, PyTypeObject *); #define PYTHON_GETSET_DEF_FULL(name, base, doc) \ PYTHON_GETSET_DEF(#name, base ## _get_ ## name, base ## _set_ ## name, doc, NULL) +#define PYTHON_GETTER_WRAPPER_DEF(name, doc) \ + { \ + #name, \ + (getter)not_yet_implemented_getter, \ + NULL, \ + doc, NULL \ + } + /** * Quelque chose est mal fait au niveau de l'abstraction GObject. * Du coup, Py_TPFLAGS_IS_ABSTRACT n'est pas pris en compte. @@ -143,6 +151,9 @@ PyObject *not_yet_implemented_method(PyObject *, PyObject *); /* Retourne toujours rien. */ PyObject *py_return_none(PyObject *, PyObject *); +/* Marque l'absence d'implémentation pour un attribut donné. */ +PyObject *not_yet_implemented_getter(PyObject *, void *); + /* Définit dans le tas de Python un nouveau type. */ PyTypeObject *define_python_dynamic_type(const PyTypeObject *); |