From 3e52984e88ad187fb5d221d8997fb4276abf103b Mon Sep 17 00:00:00 2001 From: BigBlack <840206@qq.com> Date: Mon, 16 Sep 2019 23:28:20 +0800 Subject: [PATCH] compiler: another C function call fix --- compiler/fn.v | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compiler/fn.v b/compiler/fn.v index 4271e7fca6..4cab57a949 100644 --- a/compiler/fn.v +++ b/compiler/fn.v @@ -752,6 +752,10 @@ fn (p mut Parser) fn_call_args(f mut Fn) &Fn { p.check(.lpar) if f.is_c { for p.tok != .rpar { + //C.func(var1, var2.method()) + //If the parameter calls a function or method that is not C, + //the value of p.calling_c is changed + p.calling_c = true ph := p.cgen.add_placeholder() typ := p.bool_expression() // Cast V byteptr to C char* (byte is unsigned in V, that led to C warnings)