Skip to content

Commit

Permalink
Handle quoted identifiers in external functions better (#6658)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Jun 30, 2020
1 parent 30373f4 commit 8857b01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OMCompiler/Compiler/Template/CodegenCFunctions.tpl
Expand Up @@ -2684,14 +2684,14 @@ template extArgF77(SimExtArg extArg, Text &preExp, Text &varDecls, Text &auxFunc
case SIMEXTARG(cref=c, outputIndex=oi, type_=T_INTEGER(__)) then
// Always prefix fortran arguments with &.
let suffix = if oi then "_ext"
'(int*) &<%contextCrefNoPrevExp(c,contextFunction,&auxFunction)%><%suffix%>'
'(int*) &<%contextCrefNoPrevExp(appendStringFirstIdent(suffix, c),contextFunction,&auxFunction)%>'
case SIMEXTARG(cref=c, outputIndex=oi, type_ = T_STRING(__)) then
// modelica_string SHOULD NOT BE PREFIXED by &!
'(char*)MMC_STRINGDATA(<%contextCrefNoPrevExp(c,contextFunction,&auxFunction)%>)'
case SIMEXTARG(cref=c, outputIndex=oi, type_=t) then
// Always prefix fortran arguments with &.
let suffix = if oi then "_ext"
'&<%contextCrefNoPrevExp(c,contextFunction, &auxFunction)%><%suffix%>'
'&<%contextCrefNoPrevExp(appendStringFirstIdent(suffix, c), contextFunction, &auxFunction)%>'
case SIMEXTARGEXP(exp=exp, type_ = T_STRING(__)) then
// modelica_string SHOULD NOT BE PREFIXED by &!
let texp = daeExp(exp, contextFunction, &preExp, &varDecls, &auxFunction)
Expand Down

0 comments on commit 8857b01

Please sign in to comment.