From: Rico Tzschichholz Date: Sun, 27 Sep 2020 17:21:37 +0000 (+0200) Subject: codegen: Don't pass CCodeFunctionCall to NULL-aware free macro X-Git-Tag: 0.50.1~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27678f059ba732466844f5e16df6faf0d0a229e8;p=thirdparty%2Fvala.git codegen: Don't pass CCodeFunctionCall to NULL-aware free macro This resulted in invalid C code: error: lvalue required as left operand of assignment --- diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index d748284bd..e782a4a58 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -3717,6 +3717,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { // FIXME this breaks in our macro, so this should not happen if (cvar is CCodeCastExpression) { cvar = ((CCodeCastExpression) cvar).inner; + } else if (cvar is CCodeFunctionCall) { + cvar = ((CCodeFunctionCall) cvar).get_arguments ()[0]; } ccall = new CCodeFunctionCall (new CCodeIdentifier (free0_func));