Skip to content

Commit

Permalink
Fix sorting of external object destructors
Browse files Browse the repository at this point in the history
  • Loading branch information
lochel authored and OpenModelica-Hudson committed Aug 24, 2017
1 parent 52b0a09 commit 29740e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/Template/CodegenC.tpl
Expand Up @@ -1623,7 +1623,7 @@ template functionCallExternalObjectDestructors(ExtObjInfo extObjInfo, String mod
{
if(data->simulationInfo->extObjs)
{
<%extObjInfo.vars |> var as SIMVAR(varKind=ext as EXTOBJ(__)) => 'omc_<%underscorePath(ext.fullClassName)%>_destructor(threadData,<%cref(var.name)%>);' ;separator="\n"%>
<%listReverse(extObjInfo.vars) |> var as SIMVAR(varKind=ext as EXTOBJ(__)) => 'omc_<%underscorePath(ext.fullClassName)%>_destructor(threadData,<%cref(var.name)%>);' ;separator="\n"%>
free(data->simulationInfo->extObjs);
data->simulationInfo->extObjs = 0;
}
Expand Down

0 comments on commit 29740e2

Please sign in to comment.