Skip to content

Commit

Permalink
fix treatment of outputs of external C functions
Browse files Browse the repository at this point in the history
see Modelica.Utilities.Examples.readRealParameterModel
  • Loading branch information
rfranke committed Aug 6, 2015
1 parent a05d797 commit f9a05a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Compiler/Template/CodegenCpp.tpl
Expand Up @@ -5069,7 +5069,9 @@ template extArg(SimExtArg extArg, Text &preExp, Text &varDecls, Text &inputAssig
else
'<%cr%><%match t case T_STRING(__) then ".c_str()" else "_ext"%>'
case SIMEXTARG(cref=c, isInput=ii, outputIndex=oi, type_=t) then
'&<%extVarName2(c)%>'
let extName = extVarName2(c)
let &outputAssign += '<%contextCref2(c,contextFunction)%> = <%extName%>;<%\n%>'
'&<%extName%>'
case SIMEXTARGEXP(__) then
daeExternalCExp(exp, contextFunction, &preExp /*BUFC*/, &varDecls /*BUFD*/,simCode , &extraFuncs , &extraFuncsDecl, extraFuncsNamespace, stateDerVectorName, useFlatArrayNotation)
case SIMEXTARGSIZE(cref=c) then
Expand Down

0 comments on commit f9a05a1

Please sign in to comment.