Fix mixed declarations and code so this file is valid C89.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9991 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2007-10-16 21:27:14 +00:00
commit 0f5c628cfb

View file

@ -82,6 +82,8 @@ String *Swig_strip_c_comments(const String *s) {
const char *c = Char(s);
const char *comment_begin = 0;
const char *comment_end = 0;
String *stripped = 0;
while (*c) {
if (!comment_begin && *c == '/') {
++c;
@ -98,12 +100,11 @@ String *Swig_strip_c_comments(const String *s) {
++c;
}
String *stripped = 0;
if (comment_begin && comment_end) {
int size = comment_begin - Char(s);
String *stripmore = 0;
stripped = NewStringWithSize(s, size);
Printv(stripped, comment_end + 1, NIL);
String *stripmore = 0;
do {
stripmore = Swig_strip_c_comments(stripped);
if (stripmore) {