diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2009-06-01 11:37:31 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2009-06-01 11:37:31 (GMT) |
commit | 1b8152d6f95b03f81aa6a4043c23a45a9f74c418 (patch) | |
tree | a7b625acaee0b9584f3b2b6aa49bd507b652bd5c /src/format/mangling | |
parent | 8724afdc73e0ddad86f46de1a3fbe0254575a76e (diff) |
Changed the old bin_routine structure to a GBinRoutine GObject.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@68 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/mangling')
-rw-r--r-- | src/format/mangling/demangler-int.h | 2 | ||||
-rw-r--r-- | src/format/mangling/demangler.c | 4 | ||||
-rw-r--r-- | src/format/mangling/demangler.h | 2 | ||||
-rw-r--r-- | src/format/mangling/itanium_gram.y | 32 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/format/mangling/demangler-int.h b/src/format/mangling/demangler-int.h index 2189bd0..f137fa0 100644 --- a/src/format/mangling/demangler-int.h +++ b/src/format/mangling/demangler-int.h @@ -34,7 +34,7 @@ typedef bool (* can_be_demangled_fc) (name_demangler *, const char *); /* Procède au décodage d'une chaîne de caractères. */ -typedef bin_routine * (* demangle_routine_fc) (name_demangler *, const char *); +typedef GBinRoutine * (* demangle_routine_fc) (name_demangler *, const char *); /* Décodeur de nom d'éléments */ diff --git a/src/format/mangling/demangler.c b/src/format/mangling/demangler.c index 5675800..e8b6b0f 100644 --- a/src/format/mangling/demangler.c +++ b/src/format/mangling/demangler.c @@ -120,9 +120,9 @@ name_demangler *get_demangler_by_type(DemanglerType type) * * ******************************************************************************/ -bin_routine *try_to_demangle_routine(name_demangler *demangler, const char *name) +GBinRoutine *try_to_demangle_routine(name_demangler *demangler, const char *name) { - bin_routine *result; /* Construction à remonter */ + GBinRoutine *result; /* Construction à remonter */ result = NULL; diff --git a/src/format/mangling/demangler.h b/src/format/mangling/demangler.h index 259d73d..3c9a6c1 100644 --- a/src/format/mangling/demangler.h +++ b/src/format/mangling/demangler.h @@ -52,7 +52,7 @@ bool init_all_demanglers(void); name_demangler *get_demangler_by_type(DemanglerType); /* Tente de décoder une chaîne de caractères donnée. */ -bin_routine *try_to_demangle_routine(name_demangler *, const char *); +GBinRoutine *try_to_demangle_routine(name_demangler *, const char *); diff --git a/src/format/mangling/itanium_gram.y b/src/format/mangling/itanium_gram.y index 7c13c79..4fa7bcb 100644 --- a/src/format/mangling/itanium_gram.y +++ b/src/format/mangling/itanium_gram.y @@ -39,7 +39,7 @@ typedef struct _itanium_demangler bool can_be_itanium_demangled(itanium_demangler *, const char *); /* Procède au décodage d'une chaîne de caractères. */ -bin_routine *demangle_itanium_routine(itanium_demangler *, const char *); +GBinRoutine *demangle_itanium_routine(itanium_demangler *, const char *); @@ -104,7 +104,7 @@ char *strmerge(char *str1, const char *sep, char *str2); } %parse-param { itanium_demangler *demangler } -%parse-param { bin_routine *routine } +%parse-param { GBinRoutine *routine } %token ITANIUM_SIGNATURE @@ -207,8 +207,8 @@ encoding: name: - nested_name { $$ = $1; set_binary_routine_name(routine, $1); } - | unscoped_name { $$ = $1; /*set_binary_routine_name(routine, $1);*/ } + nested_name { $$ = $1; g_binary_routine_set_name(routine, $1); } + | unscoped_name { $$ = $1; /*g_binary_routine_set_name(routine, $1);*/ } | unscoped_template_name template_args { $$ = stradd($1, $2); /* TODO : merge -> free */ } ; @@ -256,12 +256,12 @@ identifier: ; ctor_dtor_name: - C1 { set_binary_routine_type(routine, RTT_CONSTRUCTOR); } - | C2 { set_binary_routine_type(routine, RTT_CONSTRUCTOR); } - | C3 { set_binary_routine_type(routine, RTT_CONSTRUCTOR); } - | D1 { set_binary_routine_type(routine, RTT_DESTRUCTOR); } - | D2 { set_binary_routine_type(routine, RTT_DESTRUCTOR); } - | D3 { set_binary_routine_type(routine, RTT_DESTRUCTOR); } + C1 { g_binary_routine_set_type(routine, RTT_CONSTRUCTOR); } + | C2 { g_binary_routine_set_type(routine, RTT_CONSTRUCTOR); } + | C3 { g_binary_routine_set_type(routine, RTT_CONSTRUCTOR); } + | D1 { g_binary_routine_set_type(routine, RTT_DESTRUCTOR); } + | D2 { g_binary_routine_set_type(routine, RTT_DESTRUCTOR); } + | D3 { g_binary_routine_set_type(routine, RTT_DESTRUCTOR); } ; @@ -319,8 +319,8 @@ builtin_type: bare_function_type: - bare_function_type type { add_arg_to_binary_routine(routine, $2); } - | type { add_arg_to_binary_routine(routine, $1); } + bare_function_type type { g_binary_routine_add_arg(routine, $2); } + | type { g_binary_routine_add_arg(routine, $1); } ; class_enum_type: @@ -448,13 +448,13 @@ bool can_be_itanium_demangled(itanium_demangler *itanium, const char *name) * * ******************************************************************************/ -bin_routine *demangle_itanium_routine(itanium_demangler *demangler, const char *name) +GBinRoutine *demangle_itanium_routine(itanium_demangler *demangler, const char *name) { - bin_routine *result; /* Construction à retourner */ + GBinRoutine *result; /* Construction à retourner */ YY_BUFFER_STATE buffer; /* Tampon pour bison */ int ret; /* Bilan de l'appel */ - result = create_binary_routine(); + result = g_binary_routine_new(); buffer = yy_scan_string(name); ret = yyparse(demangler, result); @@ -462,7 +462,7 @@ bin_routine *demangle_itanium_routine(itanium_demangler *demangler, const char * if (ret != 0) { - delete_binary_routine(result); + /*delete_binary_routine(result); FIXME */ result = NULL; } |