Skip to content

Commit fb9af63

Browse files
author
Peter Aronsson
committed
-Changed to using Print.saveAndClearBuf and Print.restoreBuf in function textString.
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15310 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 6a02fca commit fb9af63

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Compiler/Template/Tpl.mo

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -751,15 +751,14 @@ algorithm
751751
outString := matchcontinue (inText)
752752
local
753753
Text txt;
754-
String str, buf_old;
754+
String str;
755+
Integer handle;
755756
case (txt)
756757
equation
757-
buf_old = Print.getString();
758-
Print.clearBuf();
758+
handle = Print.saveAndClearBuf();
759759
textStringBuf(txt);
760760
str = Print.getString();
761-
Print.clearBuf();
762-
Print.printBuf(buf_old);
761+
Print.restoreBuf(handle);
763762
then
764763
str;
765764

0 commit comments

Comments
 (0)