[vala/0.48] codegen: Use g_boxed_free in free-wrapper for heap-allocated GLib.Value
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] codegen: Use g_boxed_free in free-wrapper for heap-allocated GLib.Value
- Date: Sun, 28 Feb 2021 17:26:26 +0000 (UTC)
commit a14f4d6d70c55eb5dd6faa5af20cc5057baa4054
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Feb 3 13:40:23 2021 +0100
codegen: Use g_boxed_free in free-wrapper for heap-allocated GLib.Value
dup-wrapper is specifically using g_boxed_copy already
codegen/valaccodebasemodule.vala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 88570b1d3..96ea9f034 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3280,7 +3280,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
push_function (function);
- if (get_ccode_is_gboxed (type.type_symbol)) {
+ if (get_ccode_is_gboxed (type.type_symbol) || (gvalue_type != null && type.type_symbol ==
gvalue_type)) {
var free_call = new CCodeFunctionCall (new CCodeIdentifier ("g_boxed_free"));
free_call.add_argument (new CCodeIdentifier (get_ccode_type_id (type.type_symbol)));
free_call.add_argument (new CCodeIdentifier ("self"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]