[vala] Revert "codegen: Create only one vala-array helper function per array-type"
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] Revert "codegen: Create only one vala-array helper function per array-type"
- Date: Tue, 9 Feb 2016 21:52:15 +0000 (UTC)
commit 3806a6918b512583c37076e1a00fa3b53ed455ca
Author: Jürg Billeter <j bitron ch>
Date: Tue Feb 9 22:10:32 2016 +0100
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
codegen/valaccodearraymodule.vala | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala
index 3b8fc6a..8922464 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]