summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-07-23 17:14:34 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-07-23 17:14:34 (GMT)
commitb509af52114501aff3ef81c49c431570f31a21d3 (patch)
treec3153a22cd716fc170c6484fa16c4fdde7dbd6d3
parent29aad9fe1113f6b5586e86aa4cc9d7d25c23d361 (diff)
Fixed some compilation errors in the Python plugin.
-rw-r--r--ChangeLog6
-rw-r--r--plugins/pychrysa/analysis/routine.c1
-rw-r--r--plugins/pychrysa/format/dex/dex.c22
3 files changed, 26 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index a94e7c1..25f0b0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+16-07-23 Cyrille Bagard <nocbos@gmail.com>
+
+ * plugins/pychrysa/analysis/routine.c:
+ * plugins/pychrysa/format/dex/dex.c:
+ Fix some compilation errors in the Python plugin.
+
16-05-30 Cyrille Bagard <nocbos@gmail.com>
* src/analysis/binary.c:
diff --git a/plugins/pychrysa/analysis/routine.c b/plugins/pychrysa/analysis/routine.c
index 2ca3560..e42650a 100644
--- a/plugins/pychrysa/analysis/routine.c
+++ b/plugins/pychrysa/analysis/routine.c
@@ -32,6 +32,7 @@
#include <i18n.h>
+#include <analysis/block.h>
#include <analysis/routine.h>
diff --git a/plugins/pychrysa/format/dex/dex.c b/plugins/pychrysa/format/dex/dex.c
index 08c48f0..dac6c90 100644
--- a/plugins/pychrysa/format/dex/dex.c
+++ b/plugins/pychrysa/format/dex/dex.c
@@ -66,18 +66,34 @@ static PyObject *py_dex_format_new(PyTypeObject *type, PyObject *args, PyObject
{
PyObject *result; /* Instance à retourner */
PyObject *content_obj; /* Objet pour le contenu */
+ PyObject *parent_obj; /* Objet pour le parent */
+ PyObject *status_obj; /* Objet pour la progression */
int ret; /* Bilan de lecture des args. */
- GBinContent *content; /* Instance GLib correspondante*/
+ GBinContent *content; /* Instance GLib du contenu */
+ GExeFormat *parent; /* Instance GLib du parent */
+ GtkStatusStack *status; /* Instance GTK de suivi */
GBinFormat *format; /* Création GLib à transmettre */
- ret = PyArg_ParseTuple(args, "O", &content_obj);
+ ret = PyArg_ParseTuple(args, "OOO", &content_obj, &parent_obj, &status_obj);
if (!ret) return NULL;
ret = PyObject_IsInstance(content_obj, (PyObject *)get_python_binary_content_type());
if (!ret) return NULL;
+ ret = PyObject_IsInstance(parent_obj, (PyObject *)get_python_executable_format_type());
+ if (!ret) return NULL;
+
+ /*
+ FIXME
+ ret = PyObject_IsInstance(status_obj, (PyObject *)get_python_binary_content_type());
+ if (!ret) return NULL;
+ */
+
content = G_BIN_CONTENT(pygobject_get(content_obj));
- format = g_dex_format_new(/* FIXME */(bin_t *)content, 0/*content*/);
+ parent = G_EXE_FORMAT(pygobject_get(parent_obj));
+ status = GTK_STATUS_STACK(pygobject_get(status_obj));
+
+ format = g_dex_format_new(content, parent, status);
result = pygobject_new(G_OBJECT(format));