Skip to content

Commit

Permalink
adapt processing of outputs to recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranke authored and OpenModelica-Hudson committed Aug 6, 2015
1 parent e2b32ce commit e182aad
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -4725,8 +4725,7 @@ case efn as EXTERNAL_FUNCTION(extArgs=extArgs) then

let &inputAssign = buffer "" /*BUFD*/
let &outputAssign = buffer "" /*BUFD*/
// make sure the variable is named "out", doh!
let retVar = if outVars then '_<%fname%>'
let retVar = if outVars then match outVars case {var} then funArgName(var) else '_<%fname%>'
let &outVarInits = buffer ""
let callPart = match outVars case {var} then
extFunCall(fn, &preExp, &varDeclsExtFunCall, &inputAssign, &outputAssign, simCode, &extraFuncs, &extraFuncsDecl, extraFuncsNamespace, stateDerVectorName, useFlatArrayNotation, false)
Expand All @@ -4750,8 +4749,6 @@ case efn as EXTERNAL_FUNCTION(extArgs=extArgs) then
)
end match



let &varDecls1 = buffer ""
let &outVarInits1 = buffer ""
let &outVarCopy1 = buffer ""
Expand All @@ -4770,9 +4767,6 @@ case efn as EXTERNAL_FUNCTION(extArgs=extArgs) then
case "" then << <%if retVar then 'output = <%retVar%>;' else '/*no output*/' %> >>
else outVarAssign1




let fnBody = <<
void /*<%retType%>*/ Functions::<%fname%>(<%funArgs |> var => funArgDefinition(var,simCode , &extraFuncs , &extraFuncsDecl, extraFuncsNamespace, stateDerVectorName, useFlatArrayNotation) ;separator=", "%><%if funArgs then if outVars then "," else ""%> <%if retVar then '<%retType%>& output' %>)/*function2*/
{
Expand Down

0 comments on commit e182aad

Please sign in to comment.