diff options
Diffstat (limited to 'plugins/dex/python/format.c')
-rw-r--r-- | plugins/dex/python/format.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/plugins/dex/python/format.c b/plugins/dex/python/format.c index 6e3d7d7..c1e4c40 100644 --- a/plugins/dex/python/format.c +++ b/plugins/dex/python/format.c @@ -73,6 +73,15 @@ static PyObject *py_dex_format_new(PyTypeObject *type, PyObject *args, PyObject int ret; /* Bilan de lecture des args. */ GExeFormat *format; /* Création GLib à transmettre */ +#define DEX_FORMAT_DOC \ + "DexFormat deals with DEX format.\n" \ + "\n" \ + "Instances can be created using the following constructor:\n" \ + "\n" \ + " DexFormat(content)" \ + "\n" \ + "Where content is a pychrysalide.analysis.BinContent object." \ + ret = PyArg_ParseTuple(args, "O&", convert_to_binary_content, &content); if (!ret) return NULL; @@ -238,7 +247,7 @@ PyTypeObject *get_python_dex_format_type(void) .tp_flags = Py_TPFLAGS_DEFAULT, - .tp_doc = "PyChrysalide Dex format", + .tp_doc = DEX_FORMAT_DOC, .tp_methods = py_dex_format_methods, .tp_getset = py_dex_format_getseters, @@ -265,18 +274,17 @@ PyTypeObject *get_python_dex_format_type(void) bool register_python_dex_format(PyObject *module) { - PyTypeObject *py_dex_format_type; /* Type Python 'DexFormat' */ + PyTypeObject *type; /* Type Python 'DexFormat' */ PyObject *dict; /* Dictionnaire du module */ - py_dex_format_type = get_python_dex_format_type(); + type = get_python_dex_format_type(); dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_DEX_FORMAT, - py_dex_format_type, get_python_executable_format_type())) + if (!register_class_for_pygobject(dict, G_TYPE_DEX_FORMAT, type, get_python_executable_format_type())) return false; - if (!define_python_dex_format_constants(py_dex_format_type)) + if (!define_python_dex_format_common_constants(type)) return false; return true; |