summaryrefslogtreecommitdiff
path: root/codegen/valaccodemethodcallmodule.vala
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-04-06 13:00:16 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2021-04-06 13:00:16 +0200
commit321fd989d425381cba2f74ce9090411376a4c688 (patch)
tree5c25ed3a7644f4664c5ef27be701a6891ad130b1 /codegen/valaccodemethodcallmodule.vala
parent43e98d93b36d0e3febfdaafe2014eff9b451120c (diff)
downloadvala-321fd989d425381cba2f74ce9090411376a4c688.tar.gz
codegen: Fix default value of get_ccode_destroy_notify_pos() and make use of it
Diffstat (limited to 'codegen/valaccodemethodcallmodule.vala')
-rw-r--r--codegen/valaccodemethodcallmodule.vala8
1 files changed, 4 insertions, 4 deletions
diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala
index bc28f7fd3..dd8e149ae 100644
--- a/codegen/valaccodemethodcallmodule.vala
+++ b/codegen/valaccodemethodcallmodule.vala
@@ -448,7 +448,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
carg_map.set (get_param_pos (get_ccode_delegate_target_pos (param)), delegate_target);
if (deleg_type.is_disposable ()) {
assert (delegate_target_destroy_notify != null);
- carg_map.set (get_param_pos (get_ccode_delegate_target_pos (param) + 0.01), delegate_target_destroy_notify);
+ carg_map.set (get_param_pos (get_ccode_destroy_notify_pos (param)), delegate_target_destroy_notify);
}
}
}
@@ -502,7 +502,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
temp_var = get_temp_variable (delegate_target_destroy_type, true, null, true);
emit_temp_var (temp_var);
set_delegate_target_destroy_notify (arg, get_variable_cexpression (temp_var.name));
- carg_map.set (get_param_pos (get_ccode_delegate_target_pos (param) + 0.01), new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_delegate_target_destroy_notify (arg)));
+ carg_map.set (get_param_pos (get_ccode_destroy_notify_pos (param)), new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, get_delegate_target_destroy_notify (arg)));
}
}
}
@@ -623,7 +623,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
emit_temp_var (temp_var);
- out_arg_map.set (get_param_pos (get_ccode_delegate_target_pos (m) + 0.01), new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, temp_ref));
+ out_arg_map.set (get_param_pos (get_ccode_destroy_notify_pos (m)), new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, temp_ref));
set_delegate_target_destroy_notify (expr, temp_ref);
} else {
@@ -688,7 +688,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
emit_temp_var (temp_var);
- out_arg_map.set (get_param_pos (get_ccode_delegate_target_pos (deleg) + 0.01), new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, temp_ref));
+ out_arg_map.set (get_param_pos (get_ccode_destroy_notify_pos (deleg)), new CCodeUnaryExpression (CCodeUnaryOperator.ADDRESS_OF, temp_ref));
set_delegate_target_destroy_notify (expr, temp_ref);
}