Skip to content

Commit

Permalink
- Do not rollback the memory pool in external functions as the output…
Browse files Browse the repository at this point in the history
… still needs to be allocated

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10234 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Oct 27, 2011
1 parent fb92220 commit e5e4238
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Compiler/susan_codegen/SimCode/SimCodeC.tpl
Expand Up @@ -2990,16 +2990,14 @@ case efn as EXTERNAL_FUNCTION(__) then
{
/* functionBodyExternalFunction: varDecls */
<%varDecls%>
/* functionBodyExternalFunction: state in */
<%if not acceptMetaModelicaGrammar() then '<%stateVar%> = get_memory_state();'%>
<%if false /* disabled due to problem with outputAlloc being discarded not acceptMetaModelicaGrammar() */ then '<%stateVar%> = get_memory_state();'%>
/* functionBodyExternalFunction: preExp */
<%preExp%>
/* functionBodyExternalFunction: outputAlloc */
<%outputAlloc%>
/* functionBodyExternalFunction: callPart */
<%callPart%>
/* functionBodyExternalFunction: state out */
<%if not acceptMetaModelicaGrammar() then 'restore_memory_state(<%stateVar%>);'%>
<%if false /* disabled due to problem with outputAlloc being discarded not acceptMetaModelicaGrammar() */ then 'restore_memory_state(<%stateVar%>);'%>
/* functionBodyExternalFunction: return */
return <%if outVars then retVar%>;
}
Expand Down

0 comments on commit e5e4238

Please sign in to comment.