From 17692a2ef0f5f61efb64592c274f8a18c3ffdeca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Wed, 23 Aug 2000 20:17:10 +0000 Subject: [PATCH] The pretty printer gets confused by comments including unbalanced single or double quotes, like in this interface file: ------------- %typemap(perl5, check) size_t *SIZE_T_VECTORINOUT { /* NEXT LINE AND REST OF WRAPPER WILL BE MISSING. */ /* Do nothing (don't check for NULL pointer) */ } void x(size_t *SIZE_T_VECTORINOUT); ------------- The code tries to find the end of the character/string constant. When it reaches EOF, nothing will get emitted because no \n is seen. This is a change to emit the last line of a string. But the pretty printer probably should be fixed to handle comments. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@688 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Swig/wrapfunc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Swig/wrapfunc.c b/Source/Swig/wrapfunc.c index 59151b2c1..61207a3d0 100644 --- a/Source/Swig/wrapfunc.c +++ b/Source/Swig/wrapfunc.c @@ -132,6 +132,7 @@ Wrapper_pretty_print(String *str, File *f) { } } } + if (!empty) Printf(f,"%s",ts); Delete(ts); Printf(f,"\n"); }