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) {
1034
1034
bracket_open++;
1035
1035
std::string args = " " ;
1036
1036
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 );
1037
1039
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;
1043
1043
} else {
1044
- args += arg_name ;
1044
+ args += src ;
1045
1045
}
1046
1046
} 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) ) {
1049
1048
args += " &" + src;
1050
1049
} else {
1051
1050
args += src;
You can’t perform that action at this time.
0 commit comments