diff options
author | Jürg Billeter <j@bitron.ch> | 2016-02-09 22:10:32 +0100 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2016-02-09 22:10:46 +0100 |
commit | 3806a6918b512583c37076e1a00fa3b53ed455ca (patch) | |
tree | a9f36f2adb939f907d6a580245a9b8f42297ce6c | |
parent | 21d211026c34891153fc8207050c0a8573bff14e (diff) | |
download | vala-3806a6918b512583c37076e1a00fa3b53ed455ca.tar.gz |
Revert "codegen: Create only one vala-array helper function per array-type"
This reverts commit fba08583d940af80a0d6b7045294de00c568d6a4.
https://bugzilla.gnome.org/show_bug.cgi?id=761736
-rw-r--r-- | codegen/valaccodearraymodule.vala | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala index 3b8fc6a19..892246487 100644 --- a/codegen/valaccodearraymodule.vala +++ b/codegen/valaccodearraymodule.vala @@ -24,6 +24,9 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule { + int next_array_dup_id = 0; + int next_array_add_id = 0; + void append_initializer_list (CCodeExpression name_cnode, InitializerList initializer_list, int rank, ref int i) { foreach (Expression e in initializer_list.get_initializers ()) { if (rank > 1) { @@ -459,7 +462,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule { } string generate_array_dup_wrapper (ArrayType array_type) { - string dup_func = "_vala_%s_array_dup".printf (get_ccode_lower_case_name (array_type.element_type)); + string dup_func = "_vala_array_dup%d".printf (++next_array_dup_id); if (!add_wrapper (dup_func)) { // wrapper already defined @@ -532,7 +535,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule { } string generate_array_copy_wrapper (ArrayType array_type) { - string dup_func = "_vala_%s_array_copy".printf (get_ccode_lower_case_name (array_type.element_type)); + string dup_func = "_vala_array_copy%d".printf (++next_array_dup_id); if (!add_wrapper (dup_func)) { // wrapper already defined @@ -586,7 +589,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule { } string generate_array_add_wrapper (ArrayType array_type) { - string add_func = "_vala_%s_array_add".printf (get_ccode_lower_case_name (array_type.element_type)); + string add_func = "_vala_array_add%d".printf (++next_array_add_id); if (!add_wrapper (add_func)) { // wrapper already defined |