Don't produce unnecessary and erroneous defines
authorunc0rr
Sat, 30 Jun 2012 00:20:01 +0400
changeset 7329 92b6d8ae99e4
parent 7327 4e35c45d0853
child 7331 0e50456d652c
Don't produce unnecessary and erroneous defines
tools/pas2c.hs
--- a/tools/pas2c.hs	Fri Jun 29 22:46:58 2012 +0400
+++ b/tools/pas2c.hs	Sat Jun 30 00:20:01 2012 +0400
@@ -424,7 +424,7 @@
 
     let phrasesBlock = if isVoid then ph else t empty <+> res <> semi $+$ ph $+$ text "return" <+> res <> semi
 
-    return [(if notDeclared then funWithVarsToDefine n params else empty) $+$
+    return [(if notDeclared && hasPassByReference params then funWithVarsToDefine n params else empty) $+$
         t empty <+> text (if hasPassByReference params then n ++ "__vars" else n) <> parens p
         $+$
         text "{"