summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaoyu Bai <divinekid@gmail.com>2009-02-07 15:26:22 +0000
committerHaoyu Bai <divinekid@gmail.com>2009-02-07 15:26:22 +0000
commit93d48cd1e50645c6d4a18589ca739b1d89e6f300 (patch)
tree8b3ef740d98d967ea9a955140de50b44744f5217
parent320f2f065f4926e72232c5ae7e735e30aac97a31 (diff)
downloadswig-93d48cd1e50645c6d4a18589ca739b1d89e6f300.tar.gz
Remove C++ line comment in .c files, so the code could also compile under C compiler
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/swig-2.0@11112 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r--Source/CParse/parser.y4
-rw-r--r--Source/DOH/fio.c1
-rw-r--r--Source/Preprocessor/cpp.c8
3 files changed, 6 insertions, 7 deletions
diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y
index 5c202de73..5f340e7e1 100644
--- a/Source/CParse/parser.y
+++ b/Source/CParse/parser.y
@@ -1130,7 +1130,7 @@ static Node *dump_nested(const char *parent) {
const char* types_array[3] = {"struct", "union", "class"};
int i;
for (i=0; i<3; i++) {
- char* code_ptr = tmp_code; //Char(n->code);
+ char* code_ptr = tmp_code;
while (code_ptr) {
/* Replace struct name (as in 'struct name {...}' ) with whitespace
name will be between struct and opening brace */
@@ -1154,7 +1154,7 @@ static Node *dump_nested(const char *parent) {
{
/* Remove SWIG directive %constant which may be left in the SWIG created typedefs */
- char* code_ptr = tmp_code; //Char(n->code);
+ char* code_ptr = tmp_code;
while (code_ptr) {
code_ptr = strstr(code_ptr, "%constant");
if (code_ptr) {
diff --git a/Source/DOH/fio.c b/Source/DOH/fio.c
index 8271cbb18..1ec65872a 100644
--- a/Source/DOH/fio.c
+++ b/Source/DOH/fio.c
@@ -340,7 +340,6 @@ int DohvPrintf(DOH *so, const char *format, va_list ap) {
enc_str = Char(enc);
} else {
enc = 0;
- //enc_str = (const char*) doh;
}
maxwidth = maxwidth + strlen(newformat) + strlen(enc_str);
*(fmt++) = 's';
diff --git a/Source/Preprocessor/cpp.c b/Source/Preprocessor/cpp.c
index bb4e53b2d..dd1cf6159 100644
--- a/Source/Preprocessor/cpp.c
+++ b/Source/Preprocessor/cpp.c
@@ -86,7 +86,7 @@ static String *cpp_include(const_String_or_char_ptr fn, int sysfile) {
}
if (!s) {
/* XXX(bhy) may not need the seek */
- // Seek(fn, 0, SEEK_SET);
+ /* Seek(fn, 0, SEEK_SET); */
if (ignore_missing) {
Swig_warning(WARN_PP_MISSING_FILE, Getfile(fn), Getline(fn), "Unable to find '%s'\n", fn);
} else {
@@ -283,7 +283,7 @@ String *Macro_vararg_name(const_String_or_char_ptr str, const_String_or_char_ptr
if (dots == s) {
varargname = NewString("__VA_ARGS__");
} else {
- //*dots = '\0';
+ /* *dots = '\0'; */
varargname = NewStringWithSize(s, dots-s);
}
Delete(argname);
@@ -407,7 +407,7 @@ Hash *Preprocessor_define(const_String_or_char_ptr _str, int swigmacro) {
{
int state = 0;
- //TODO(bhy): fix later
+ /* TODO(bhy): fix later */
char *cc = (char *) Char(macrovalue);
while (*cc) {
switch (state) {
@@ -854,7 +854,7 @@ static String *expand_macro(String *name, List *args) {
s = Char(ns);
name = Char(aname);
namelen = Len(aname);
- //TODO(bhy) fix later
+ /* TODO(bhy) fix later */
a = strstr(s, name);
while (a) {
char ca = a[namelen + 1];