summaryrefslogtreecommitdiff
path: root/src/format/symbol.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2015-07-17 16:36:21 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2015-07-17 16:36:21 (GMT)
commit24d3836fcf8d443eb654b981f65478cd9923b8f1 (patch)
tree7672a28b864127e8958c3c6cce751dcf646d2fbe /src/format/symbol.c
parenta61f089babe336b012da31a494b0f7470b6e1a9a (diff)
Updated the Python bindings.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@552 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/symbol.c')
-rw-r--r--src/format/symbol.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/format/symbol.c b/src/format/symbol.c
index 898f00d..70a1d24 100644
--- a/src/format/symbol.c
+++ b/src/format/symbol.c
@@ -310,7 +310,13 @@ const char *g_binary_symbol_get_label(const GBinSymbol *symbol)
void g_binary_symbol_set_alt_label(GBinSymbol *symbol, const char *alt)
{
- symbol->alt = strdup(alt);
+ if (symbol->alt != NULL)
+ free(symbol->alt);
+
+ if (alt == NULL)
+ symbol->alt = NULL;
+ else
+ symbol->alt = strdup(alt);
}
@@ -493,7 +499,7 @@ void g_binary_symbol_attach_instruction(GBinSymbol *symbol, GArchInstruction *in
* *
* Description : Fournit l'éventuelle routine associée au symbole. *
* *
-* Retour : - *
+* Retour : Instance GLib en place ou NULL si aucune. *
* *
* Remarques : Il n'y a pas de transfert de propriété ici ! *
* *
@@ -512,7 +518,7 @@ GBinRoutine *g_binary_symbol_get_routine(const GBinSymbol *symbol)
* *
* Description : Fournit l'éventuelle instruction associée au symbole. *
* *
-* Retour : - *
+* Retour : Instance GLib en place ou NULL si aucune. *
* *
* Remarques : Il n'y a pas de transfert de propriété ici ! *
* *
@@ -551,7 +557,7 @@ void g_binary_symbol_set_comment(GBinSymbol *symbol, GDbComment *comment)
* *
* Description : Fournit l'éventuel commentaire associé au symbole. *
* *
-* Retour : - *
+* Retour : Instance GLib en place ou NULL si aucune. *
* *
* Remarques : Il n'y a pas de transfert de propriété ici ! *
* *