]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Cast *_destroy_func arg of generic-types calls to GDestroyNotify
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 27 Feb 2017 14:45:40 +0000 (15:45 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 27 Feb 2017 14:45:40 +0000 (15:45 +0100)
codegen/valaccodebasemodule.vala

index 95128956266f4e55366857153ab52c032eddab8e..4be48a044a5d001f1efb6ce868b7d7bdebe64276 100644 (file)
@@ -4482,7 +4482,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                                        return;
                                }
                                arg_map.set (get_param_pos (0.1 * type_param_index + 0.04), new CCodeCastExpression (dup_func, "GBoxedCopyFunc"));
-                               arg_map.set (get_param_pos (0.1 * type_param_index + 0.06), get_destroy_func_expression (type_arg, is_chainup));
+                               arg_map.set (get_param_pos (0.1 * type_param_index + 0.06), new CCodeCastExpression (get_destroy_func_expression (type_arg, is_chainup), "GDestroyNotify"));
                        } else {
                                arg_map.set (get_param_pos (0.1 * type_param_index + 0.04), new CCodeConstant ("NULL"));
                                arg_map.set (get_param_pos (0.1 * type_param_index + 0.06), new CCodeConstant ("NULL"));