[vala/wip/issue/871: 1/2] codegen: Fix setting of generic-type properties for gobject style chain up
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/issue/871: 1/2] codegen: Fix setting of generic-type properties for gobject style chain up
- Date: Thu, 31 Oct 2019 14:32:16 +0000 (UTC)
commit 5baca30c036b3980bef5948c12ee711cd23ea91c
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Thu Oct 31 10:39:44 2019 +0100
codegen: Fix setting of generic-type properties for gobject style chain up
Correctly refer to their canonical names.
See https://bugzilla.gnome.org/show_bug.cgi?id=654702
codegen/valaccodebasemodule.vala | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 873f1ad34..f3c044a44 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -4607,10 +4607,10 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
int type_param_index = 0;
foreach (var type_arg in type_args) {
if (type_parameters != null) {
- var type_param_name = type_parameters.get (type_param_index).name.down ();
- arg_map.set (get_param_pos (0.1 * type_param_index + 0.01), new CCodeConstant
("\"%s_type\"".printf (type_param_name)));
- arg_map.set (get_param_pos (0.1 * type_param_index + 0.03), new CCodeConstant
("\"%s_dup_func\"".printf (type_param_name)));
- arg_map.set (get_param_pos (0.1 * type_param_index + 0.05), new CCodeConstant
("\"%s_destroy_func\"".printf (type_param_name)));
+ var type_param_name = type_parameters.get (type_param_index).name.down
().replace ("_", "-");
+ arg_map.set (get_param_pos (0.1 * type_param_index + 0.01), new CCodeConstant
("\"%s-type\"".printf (type_param_name)));
+ arg_map.set (get_param_pos (0.1 * type_param_index + 0.03), new CCodeConstant
("\"%s-dup-func\"".printf (type_param_name)));
+ arg_map.set (get_param_pos (0.1 * type_param_index + 0.05), new CCodeConstant
("\"%s-destroy-func\"".printf (type_param_name)));
}
arg_map.set (get_param_pos (0.1 * type_param_index + 0.02), get_type_id_expression
(type_arg, is_chainup));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]