[vala/wip/682_array_methods_refactor: 3/18] Change order of free_func




commit 0f68b7deef6e63e6bcb5a20a91035fdedcf2e594
Author: Vladyslav Stovmanenko <flaviusglamfenix gmail com>
Date:   Thu May 5 09:43:09 2022 +0000

    Change order of free_func

 codegen/valaccodearraymodule.vala      | 2 +-
 codegen/valaccodemethodcallmodule.vala | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valaccodearraymodule.vala b/codegen/valaccodearraymodule.vala
index 9b5096d79..849e9ce19 100644
--- a/codegen/valaccodearraymodule.vala
+++ b/codegen/valaccodearraymodule.vala
@@ -395,10 +395,10 @@ 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 ("element_size", get_ccode_name (size_t_type)));
+               fun.add_parameter (new CCodeParameter (free_func.name, get_ccode_name 
(delegate_target_destroy_type)));
                fun.add_parameter (new CCodeParameter ("src", get_ccode_name (ssize_t_type)));
                fun.add_parameter (new CCodeParameter ("dest", get_ccode_name (ssize_t_type)));
                fun.add_parameter (new CCodeParameter ("length", get_ccode_name (ssize_t_type)));
-               fun.add_parameter (new CCodeParameter (free_func.name, get_ccode_name 
(delegate_target_destroy_type)));
 
                push_function (fun);
 
diff --git a/codegen/valaccodemethodcallmodule.vala b/codegen/valaccodemethodcallmodule.vala
index 4df84d950..4c6ecf069 100644
--- a/codegen/valaccodemethodcallmodule.vala
+++ b/codegen/valaccodemethodcallmodule.vala
@@ -338,7 +338,7 @@ public class Vala.CCodeMethodCallModule : CCodeAssignmentModule {
                        csizeof.add_argument (new CCodeIdentifier (get_ccode_name (array_type.element_type)));
                        in_arg_map.set (get_param_pos (0.1), csizeof);
 
-                       in_arg_map.set (get_param_pos (0.5), 
get_destroy_func_expression(array_type.element_type));
+                       in_arg_map.set (get_param_pos (0.2), 
get_destroy_func_expression(array_type.element_type));
                } else if (m is DynamicMethod) {
                        emit_context.push_symbol (m);
                        m.clear_parameters ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]