[vala/staging] codegen: Replace specific hardcoded "GDestroyNotify" references (POSIX)
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Replace specific hardcoded "GDestroyNotify" references (POSIX)
- Date: Sat, 19 Oct 2019 08:39:25 +0000 (UTC)
commit 126775640944cc782f71e6ced6a215993660dd38
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Oct 19 00:12:26 2019 +0200
codegen: Replace specific hardcoded "GDestroyNotify" references (POSIX)
codegen/valaccodearraymodule.vala | 6 +++---
codegen/valaccodebasemodule.vala | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala
index 4e295c7c6..f8228b8cd 100644
--- a/codegen/valaccodearraymodule.vala
+++ b/codegen/valaccodearraymodule.vala
@@ -286,7 +286,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
fun.modifiers = CCodeModifiers.STATIC;
fun.add_parameter (new CCodeParameter ("array", get_ccode_name (pointer_type)));
fun.add_parameter (new CCodeParameter ("array_length", get_ccode_name (int_type)));
- fun.add_parameter (new CCodeParameter ("destroy_func", "GDestroyNotify"));
+ fun.add_parameter (new CCodeParameter ("destroy_func", get_ccode_name
(delegate_target_destroy_type)));
push_function (fun);
@@ -310,7 +310,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
fun.modifiers = CCodeModifiers.STATIC;
fun.add_parameter (new CCodeParameter ("array", get_ccode_name (pointer_type)));
fun.add_parameter (new CCodeParameter ("array_length", get_ccode_name (int_type)));
- fun.add_parameter (new CCodeParameter ("destroy_func", "GDestroyNotify"));
+ fun.add_parameter (new CCodeParameter ("destroy_func", get_ccode_name
(delegate_target_destroy_type)));
push_function (fun);
@@ -482,7 +482,7 @@ public class Vala.CCodeArrayModule : CCodeMethodCallModule {
ccall = new CCodeFunctionCall (new CCodeIdentifier ("_vala_array_destroy"));
ccall.add_argument (get_cvalue_ (value));
ccall.add_argument (get_ccodenode (array_type.length));
- ccall.add_argument (new CCodeCastExpression (get_destroy_func_expression
(array_type.element_type), "GDestroyNotify"));
+ ccall.add_argument (new CCodeCastExpression (get_destroy_func_expression
(array_type.element_type), get_ccode_name (delegate_target_destroy_type)));
return ccall;
} else {
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index cc737edd8..2f378539b 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3665,7 +3665,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
requires_array_free = true;
ccall.call = new CCodeIdentifier ("_vala_array_free");
ccall.add_argument (csizeexpr);
- ccall.add_argument (new CCodeCastExpression
(get_destroy_func_expression (array_type.element_type), "GDestroyNotify"));
+ ccall.add_argument (new CCodeCastExpression
(get_destroy_func_expression (array_type.element_type), get_ccode_name (delegate_target_destroy_type)));
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]