summaryrefslogtreecommitdiff
path: root/src/format
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
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')
-rwxr-xr-xsrc/format/dex/dex.h9
-rw-r--r--src/format/symbol.c14
-rw-r--r--src/format/symbol.h4
3 files changed, 22 insertions, 5 deletions
diff --git a/src/format/dex/dex.h b/src/format/dex/dex.h
index aca6cef..7f427a3 100755
--- a/src/format/dex/dex.h
+++ b/src/format/dex/dex.h
@@ -57,6 +57,15 @@ GType g_dex_format_get_type(void);
/* Prend en charge un nouveau format DEX. */
GBinFormat *g_dex_format_new(const bin_t *, off_t);
+/* Redéfinition : classe issue du code source (instance) */
+typedef struct _GDexClass GDexClass;
+
+/* Dénombre le nombre de classes trouvées. */
+size_t g_dex_format_count_classes(const GDexFormat *);
+
+/* Fournit une classe du format chargée en mémoire. */
+GDexClass *g_dex_format_get_class(const GDexFormat *, size_t);
+
#endif /* _FORMAT_DEX_DEX_H */
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 ! *
* *
diff --git a/src/format/symbol.h b/src/format/symbol.h
index e0b657d..1368691 100644
--- a/src/format/symbol.h
+++ b/src/format/symbol.h
@@ -44,7 +44,9 @@ typedef enum _SymbolType
STP_FUNCTION, /* Simple morceau de code */
STP_ENTRY_POINT, /* Morceau de code en entrée */
STP_STRING, /* Chaîne de caractères */
- STP_RO_STRING /* Chaîne de caractères */
+ STP_RO_STRING, /* Chaîne de caractères */
+
+ STP_COUNT
} SymbolType;