summaryrefslogtreecommitdiff
path: root/plugins/dex/python/routine.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/dex/python/routine.c')
-rw-r--r--plugins/dex/python/routine.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/plugins/dex/python/routine.c b/plugins/dex/python/routine.c
index ef85cc7..31410c7 100644
--- a/plugins/dex/python/routine.c
+++ b/plugins/dex/python/routine.c
@@ -36,6 +36,15 @@
+#define DEX_ROUTINE_DOC \
+ "The DexRoutine is a definition of binary routine for DEX methods." \
+ "\n" \
+ "The only reason for such an object to exist is to provide a link" \
+ " to a pychrysalide.format.dex.DexMethod from a" \
+ " pychrysalide.analysis.BinRoutine."
+
+
+
/* Fournit la méthode liée à une routine d'origine Dex. */
static PyObject *py_dex_routine_get_method(PyObject *, void *);
@@ -61,6 +70,14 @@ static PyObject *py_dex_routine_get_method(PyObject *self, void *closure)
GDexRoutine *routine; /* Version native */
GDexMethod *method; /* Méthode correspondante */
+#define DEX_ROUTINE_METHOD_ATTRIB PYTHON_GET_DEF_FULL \
+( \
+ method, py_dex_routine, \
+ "Dex method attached to the Dex routine." \
+ "\n" \
+ "The result is a pychrysalide.format.dex.DexMethod instance or None." \
+)
+
routine = G_DEX_ROUTINE(pygobject_get(self));
method = g_dex_routine_get_method(routine);
@@ -102,10 +119,7 @@ PyTypeObject *get_python_dex_routine_type(void)
};
static PyGetSetDef py_dex_routine_getseters[] = {
- {
- "method", py_dex_routine_get_method, NULL,
- "Dex method attached to the Dex routine.", NULL
- },
+ DEX_ROUTINE_METHOD_ATTRIB,
{ NULL }
};
@@ -118,7 +132,7 @@ PyTypeObject *get_python_dex_routine_type(void)
.tp_flags = Py_TPFLAGS_DEFAULT,
- .tp_doc = "PyChrysalide Dex routine.",
+ .tp_doc = DEX_ROUTINE_DOC,
.tp_methods = py_dex_routine_methods,
.tp_getset = py_dex_routine_getseters