diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-02-01 18:12:31 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-02-01 18:12:31 (GMT) |
commit | 113f37b954e395beb2a335e5e364746c70af625d (patch) | |
tree | d58b2839f1dd95096f72221c07c4b2a508eca6e9 /plugins/pychrysalide/analysis/project.c | |
parent | 9d4a0ba0e5a217bf4ac63c21e14d5f44580b6138 (diff) |
Inserted an option to render disassembly even in batch mode.
Diffstat (limited to 'plugins/pychrysalide/analysis/project.c')
-rw-r--r-- | plugins/pychrysalide/analysis/project.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/plugins/pychrysalide/analysis/project.c b/plugins/pychrysalide/analysis/project.c index 137efbf..9046bf3 100644 --- a/plugins/pychrysalide/analysis/project.c +++ b/plugins/pychrysalide/analysis/project.c @@ -77,16 +77,18 @@ static PyObject *py_study_project_new(PyTypeObject *type, PyObject *args, PyObje { PyObject *result; /* Instance à retourner */ const char *filename; /* Destination de la sauvegarde*/ + int cache; /* Préparation de rendu ? */ int ret; /* Bilan de lecture des args. */ GStudyProject *project; /* Version GLib du projet */ filename = NULL; + cache = 0; - ret = PyArg_ParseTuple(args, "|s", &filename); + ret = PyArg_ParseTuple(args, "|sp", &filename, &cache); if (!ret) return NULL; if (filename != NULL) - project = g_study_project_open(filename); + project = g_study_project_open(filename, cache); else project = g_study_project_new(); @@ -202,15 +204,18 @@ static bool filter_loadable_content_with_python(GLoadedContent *content, PyObjec static PyObject *py_study_project_discover_binary_content(PyObject *self, PyObject *args) { - PyObject *callable; /* Filtre de contenus éventuel */ GBinContent *content; /* Instance de contenu binaire */ + int cache; /* Préparation de rendu ? */ + PyObject *callable; /* Filtre de contenus éventuel */ int ret; /* Bilan de lecture des args. */ GStudyProject *project; /* Version GLib du format */ + cache = 0; callable = NULL; - ret = PyArg_ParseTuple(args, "O&|O&", + ret = PyArg_ParseTuple(args, "O&|pO&", convert_to_binary_content, &content, + &cache, convert_to_callable, &callable); if (!ret) return NULL; @@ -220,14 +225,14 @@ static PyObject *py_study_project_discover_binary_content(PyObject *self, PyObje { Py_INCREF(callable); - g_study_project_discover_binary_content(project, content, + g_study_project_discover_binary_content(project, content, cache, (filter_loadable_cb)filter_loadable_content_with_python, callable); } else - g_study_project_discover_binary_content(project, content, NULL, NULL); + g_study_project_discover_binary_content(project, content, cache, NULL, NULL); Py_RETURN_NONE; @@ -331,7 +336,7 @@ PyTypeObject *get_python_study_project_type(void) { "discover", py_study_project_discover_binary_content, METH_VARARGS, - "discover($self, content, /)\n--\n\nExplore a new binary content for the project." + "discover($self, content, cache, filter/)\n--\n\nExplore a new binary content for the project." }, { "attach", py_study_project_attach_content, |