summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/analysis
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2020-04-29 21:36:48 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2020-04-29 21:36:48 (GMT)
commit85ddac0558313b5d3fbd9428ae3e9614f16d514d (patch)
tree208bdf6311ba8414e38909870be753fcd062d404 /plugins/pychrysalide/analysis
parent2e867fcae6e91594ae47528ca097952398ffcca4 (diff)
Improved the documentation of the disassembly cache for Python.
Diffstat (limited to 'plugins/pychrysalide/analysis')
-rw-r--r--plugins/pychrysalide/analysis/binary.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/plugins/pychrysalide/analysis/binary.c b/plugins/pychrysalide/analysis/binary.c
index 3126a47..acc3ae5 100644
--- a/plugins/pychrysalide/analysis/binary.c
+++ b/plugins/pychrysalide/analysis/binary.c
@@ -71,7 +71,7 @@ static PyObject *py_loaded_binary_get_format(PyObject *, void *);
static PyObject *py_loaded_binary_get_processor(PyObject *, void *);
/* Fournit le tampon associé au contenu assembleur d'un binaire. */
-static PyObject *py_loaded_binary_get_disassembled_cache(PyObject *, void *);
+static PyObject *py_loaded_binary_get_disassembly_cache(PyObject *, void *);
@@ -476,14 +476,26 @@ static PyObject *py_loaded_binary_get_processor(PyObject *self, void *closure)
* *
******************************************************************************/
-static PyObject *py_loaded_binary_get_disassembled_cache(PyObject *self, void *closure)
+static PyObject *py_loaded_binary_get_disassembly_cache(PyObject *self, void *closure)
{
PyObject *result; /* Trouvailles à retourner */
GLoadedBinary *binary; /* Version native */
GBufferCache *cache; /* Tampon à récupérer */
+#define LOADED_BINARY_DISASSEMBLY_CACHE_ATTRIB PYTHON_GET_DEF_FULL \
+( \
+ disassembly_cache, py_loaded_binary, \
+ "Give access to the disassembly graphical cache, which is a" \
+ " pychrysalide.glibext.BufferCache instance or None.\n" \
+ "\n" \
+ "In graphical mode, the cache is built by default. Otherwise, the" \
+ " build depends on the *cache* argument provided at the analysis" \
+ " call (please refer to the pychrysalide.analysis.LoadedContent" \
+ " interface for more information about this kind of call)." \
+)
+
binary = G_LOADED_BINARY(pygobject_get(self));
- cache = g_loaded_binary_get_disassembled_cache(binary);
+ cache = g_loaded_binary_get_disassembly_cache(binary);
if (cache != NULL)
{
@@ -537,10 +549,7 @@ PyTypeObject *get_python_loaded_binary_type(void)
"processor", py_loaded_binary_get_processor, NULL,
"Handler for the current binary processor.", NULL
},
- {
- "disassembled_cache", py_loaded_binary_get_disassembled_cache, NULL,
- "Disassembled buffer cache.", NULL
- },
+ LOADED_BINARY_DISASSEMBLY_CACHE_ATTRIB,
{ NULL }
};