diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2013-03-19 21:13:51 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2013-03-19 21:13:51 (GMT) |
commit | cf97db0ea4d1ea983db38df85984034b49fa4f77 (patch) | |
tree | b6d69945b24ec8da93f0bef7ccf4dfdbe1d920a2 /plugins/pychrysa | |
parent | e7a85861ba8bcd00ceb7bf9e47f4eadccd48ce3f (diff) |
Defined the first steps towards new graph renderings.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@345 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins/pychrysa')
-rw-r--r-- | plugins/pychrysa/analysis/blocks/flow.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/pychrysa/analysis/blocks/flow.c b/plugins/pychrysa/analysis/blocks/flow.c index 216156c..49f3003 100644 --- a/plugins/pychrysa/analysis/blocks/flow.c +++ b/plugins/pychrysa/analysis/blocks/flow.c @@ -40,6 +40,8 @@ /* Fournit les adresses limites d'un bloc d'exécution. */ static PyObject *py_flow_block_get_boundary_addresses(PyObject *, void *); +/* Fournit le rang du bloc dans le flot d'exécution. */ +static PyObject *py_flow_block_get_rank(PyObject *, void *); @@ -77,6 +79,33 @@ static PyObject *py_flow_block_get_boundary_addresses(PyObject *self, void *clos } +/****************************************************************************** +* * +* Paramètres : self = classe représentant une instruction. * +* closure = adresse non utilisée ici. * +* * +* Description : Fournit le rang du bloc dans le flot d'exécution. * +* * +* Retour : Valeur associée à la propriété consultée. * +* * +* Remarques : - * +* * +******************************************************************************/ + +static PyObject *py_flow_block_get_rank(PyObject *self, void *closure) +{ + PyObject *result; /* Trouvailles à retourner */ + GFlowBlock *block; /* Version native */ + + block = G_FLOW_BLOCK(pygobject_get(self)); + + result = Py_BuildValue("I", g_flow_block_get_rank(block)); + + return result; + +} + + @@ -110,6 +139,10 @@ bool register_python_flow_block(PyObject *module) "boundary_addresses", (getter)py_flow_block_get_boundary_addresses, (setter)NULL, "Provide the boundary addresses of the current flow block.", NULL }, + { + "rank", (getter)py_flow_block_get_rank, (setter)NULL, + "Provide the rank of the current block in the execution flow.", NULL + }, { NULL } }; |