summaryrefslogtreecommitdiff
path: root/plugins/pychrysa/format/symbol.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2017-12-08 20:50:56 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2017-12-08 20:50:56 (GMT)
commit39116dce7d40dab310e929f92fdbfc865b5fac20 (patch)
treea0b8dc11070f8a68de6b6f7bbc84b3d4ccf25afd /plugins/pychrysa/format/symbol.c
parentcf11fcf862b98ef57935bcfccd6f2f6ae3f925f6 (diff)
Introduced the symbol visibility.
Diffstat (limited to 'plugins/pychrysa/format/symbol.c')
-rw-r--r--plugins/pychrysa/format/symbol.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/plugins/pychrysa/format/symbol.c b/plugins/pychrysa/format/symbol.c
index b9ac13c..736a8d2 100644
--- a/plugins/pychrysa/format/symbol.c
+++ b/plugins/pychrysa/format/symbol.c
@@ -57,6 +57,9 @@ static PyObject *py_binary_symbol_get_label(PyObject *, void *);
/* Fournit l'emplacement où se situe un symbole. */
static PyObject *py_binary_symbol_get_range(PyObject *, void *);
+/* Fournit la visibilité du symbole. */
+static PyObject *py_binary_symbol_get_status(PyObject *, void *);
+
/* Définit les constantes pour les symboles binaires. */
static bool py_binary_symbol_define_constants(PyTypeObject *);
@@ -285,6 +288,35 @@ static PyObject *py_binary_symbol_get_range(PyObject *self, void *closure)
/******************************************************************************
* *
+* Paramètres : self = objet Python concerné par l'appel. *
+* closure = non utilisé ici. *
+* *
+* Description : Fournit la visibilité du symbole. *
+* *
+* Retour : Etat de la visibilité du symbole représenté. *
+* *
+* Remarques : - *
+* *
+******************************************************************************/
+
+static PyObject *py_binary_symbol_get_status(PyObject *self, void *closure)
+{
+ PyObject *result; /* Valeur à retourner */
+ GBinSymbol *symbol; /* Elément à consulter */
+ SymbolStatus status; /* Visibilité du symbole fourni*/
+
+ symbol = G_BIN_SYMBOL(pygobject_get(self));
+ status = g_binary_symbol_get_status(symbol);
+
+ result = PyLong_FromLong(status);
+
+ return result;
+
+}
+
+
+/******************************************************************************
+* *
* Paramètres : obj_type = type dont le dictionnaire est à compléter. *
* *
* Description : Définit les constantes pour les symboles binaires. *
@@ -351,6 +383,10 @@ PyTypeObject *get_python_binary_symbol_type(void)
"range", py_binary_symbol_get_range, NULL,
"Range covered by the symbol.", NULL
},
+ {
+ "status", py_binary_symbol_get_status, NULL,
+ "Status of the symbol's visibility.", NULL
+ },
{ NULL }
};