| ... | ... | @@ -3130,12 +3130,15 @@ fn transCallExpr(rp: RestorePoint, scope: *Scope, stmt: *const clang.CallExpr, r |
| 3130 | 3130 | if (fn_ty) |ty| { |
| 3131 | 3131 | switch (ty) { |
| 3132 | 3132 | .Proto => |fn_proto| { |
| 3133 | | const param_qt = fn_proto.getParamType(@intCast(c_uint, i)); |
| 3134 | | if (isBoolRes(call_param) and cIsNativeInt(param_qt)) { |
| 3135 | | const builtin_node = try rp.c.createBuiltinCall("@boolToInt", 1); |
| 3136 | | builtin_node.params()[0] = call_param; |
| 3137 | | builtin_node.rparen_token = try appendToken(rp.c, .RParen, ")"); |
| 3138 | | call_param = &builtin_node.base; |
| 3133 | const param_count = fn_proto.getNumParams(); |
| 3134 | if (i < param_count) { |
| 3135 | const param_qt = fn_proto.getParamType(@intCast(c_uint, i)); |
| 3136 | if (isBoolRes(call_param) and cIsNativeInt(param_qt)) { |
| 3137 | const builtin_node = try rp.c.createBuiltinCall("@boolToInt", 1); |
| 3138 | builtin_node.params()[0] = call_param; |
| 3139 | builtin_node.rparen_token = try appendToken(rp.c, .RParen, ")"); |
| 3140 | call_param = &builtin_node.base; |
| 3141 | } |
| 3139 | 3142 | } |
| 3140 | 3143 | }, |
| 3141 | 3144 | else => {}, |