Skip to content

Commit 96433ad

Browse files
committed
C_CPP: Fix inner struct pass to func
1 parent b81d0d7 commit 96433ad

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/libasr/codegen/asr_to_c_cpp.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,15 +1079,7 @@ PyMODINIT_FUNC PyInit_lpython_module_)" + fn_name + R"((void) {
10791079
+ "' not implemented");
10801080
}
10811081
} else {
1082-
std::string args;
1083-
bracket_open++;
1084-
for (size_t i=0; i<x.n_args; i++) {
1085-
self().visit_expr(*x.m_args[i].m_value);
1086-
args += src;
1087-
if (i < x.n_args-1) args += ", ";
1088-
}
1089-
bracket_open--;
1090-
src = fn_name + "(" + args + ")";
1082+
src = fn_name + "(" + construct_call_args(x.n_args, x.m_args) + ")";
10911083
}
10921084
last_expr_precedence = 2;
10931085
if( ASR::is_a<ASR::List_t>(*x.m_type) ) {

0 commit comments

Comments
 (0)