diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-07-04 12:39:01 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-07-04 12:39:01 (GMT) |
commit | ade3ee4fd3b78e96deb08210838643969f2f6699 (patch) | |
tree | 09003a6f4ac00c09560de9ea9a91c125a7b14f68 /plugins/pychrysalide/format | |
parent | a0463dfa8fe232d01ea925668f393d7507fa787b (diff) |
Updated the API for building symbol labels.
Diffstat (limited to 'plugins/pychrysalide/format')
-rw-r--r-- | plugins/pychrysalide/format/symbol.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/pychrysalide/format/symbol.c b/plugins/pychrysalide/format/symbol.c index ae13cf2..7dcb0eb 100644 --- a/plugins/pychrysalide/format/symbol.c +++ b/plugins/pychrysalide/format/symbol.c @@ -25,6 +25,7 @@ #include "symbol.h" +#include <malloc.h> #include <pygobject.h> @@ -238,13 +239,16 @@ static PyObject *py_binary_symbol_get_label(PyObject *self, void *closure) { PyObject *result; /* Valeur à retourner */ GBinSymbol *symbol; /* Elément à consulter */ - const char *label; /* Désignation courante */ + char *label; /* Désignation courante */ symbol = G_BIN_SYMBOL(pygobject_get(self)); label = g_binary_symbol_get_label(symbol); if (label != NULL) + { result = PyUnicode_FromString(label); + free(label); + } else { |