File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -1034,18 +1034,17 @@ PyMODINIT_FUNC PyInit_lpython_module_)" + fn_name + R"((void) {
10341034 bracket_open++;
10351035 std::string args = " " ;
10361036 for (size_t i=0 ; i<n_args; i++) {
1037+ self ().visit_expr (*m_args[i].m_value );
1038+ ASR::ttype_t * type = ASRUtils::expr_type (m_args[i].m_value );
10371039 if (ASR::is_a<ASR::Var_t>(*m_args[i].m_value )) {
1038- ASR::Variable_t *arg = ASRUtils::EXPR2VAR (m_args[i].m_value );
1039- std::string arg_name = arg->m_name ;
1040- if ( ASRUtils::is_array (arg->m_type ) &&
1041- ASRUtils::is_pointer (arg->m_type ) ) {
1042- args += " &" + arg_name;
1040+ if ( ASRUtils::is_array (type) &&
1041+ ASRUtils::is_pointer (type) ) {
1042+ args += " &" + src;
10431043 } else {
1044- args += arg_name ;
1044+ args += src ;
10451045 }
10461046 } else {
1047- self ().visit_expr (*m_args[i].m_value );
1048- if ( ASR::is_a<ASR::Struct_t>(*ASRUtils::expr_type (m_args[i].m_value )) ) {
1047+ if ( ASR::is_a<ASR::Struct_t>(*type) ) {
10491048 args += " &" + src;
10501049 } else {
10511050 args += src;
You can’t perform that action at this time.
0 commit comments