[vala/0.48] codegen: Don't pass CCodeFunctionCall to NULL-aware free macro
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.48] codegen: Don't pass CCodeFunctionCall to NULL-aware free macro
- Date: Tue, 29 Sep 2020 07:30:07 +0000 (UTC)
commit edd7799a9ba689ba163329b106dfb9932111a527
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Sep 27 19:21:37 2020 +0200
codegen: Don't pass CCodeFunctionCall to NULL-aware free macro
This resulted in invalid C code:
error: lvalue required as left operand of assignment
codegen/valaccodebasemodule.vala | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 55d7dc56e..cec1ae22f 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3690,6 +3690,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));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]