Merged revisions 11085-11086,11088-11089 via svnmerge from

https://swig.svn.sourceforge.net/svnroot/swig/branches/swig-2.0

........
  r11085 | bhy | 2009-01-25 00:21:55 +0800 (Sun, 25 Jan 2009) | 2 lines
  
  Fix const-correctness.
........
  r11086 | bhy | 2009-01-25 02:08:50 +0800 (Sun, 25 Jan 2009) | 2 lines
  
  Correct some function definition in header files, which implementation changed in previous commit caused mismatch.
........
  r11088 | bhy | 2009-01-25 02:38:32 +0800 (Sun, 25 Jan 2009) | 1 line
  
  minor fix and now SWIG is alive again
........
  r11089 | bhy | 2009-01-25 06:07:07 +0800 (Sun, 25 Jan 2009) | 1 line
  
  Correct some bug introduced in previous commits. Now SWIG is pretty good with C++ compiler.
........


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11097 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Haoyu Bai 2009-01-30 10:27:37 +00:00
commit 47b4825168
15 changed files with 44 additions and 41 deletions

View file

@ -85,7 +85,8 @@ static String *cpp_include(const_String_or_char_ptr fn, int sysfile) {
Setattr(included_files, file, file);
}
if (!s) {
Seek(fn, 0, SEEK_SET);
/* XXX(bhy) may not need the seek */
// 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 {
@ -261,7 +262,7 @@ void Preprocessor_error_as_warning(int a) {
* ----------------------------------------------------------------------------- */
const_String_or_char_ptr Macro_vararg_name(const_String_or_char_ptr str, const_String_or_char_ptr line) {
String *Macro_vararg_name(const_String_or_char_ptr str, const_String_or_char_ptr line) {
String *argname;
String *varargname;
char *s, *dots;
@ -295,18 +296,18 @@ Hash *Preprocessor_define(const_String_or_char_ptr _str, int swigmacro) {
List *arglist = 0;
int c, line;
int varargs = 0;
const_String_or_char_ptr str = (const_String_or_char_ptr ) _str;
String *str;
assert(cpp);
assert(str);
assert(_str);
/* First make sure that string is actually a string */
if (DohCheck(str)) {
s = Copy(str);
copy_location(str, s);
if (DohCheck(_str)) {
s = Copy(_str);
copy_location(_str, s);
str = s;
} else {
str = NewString((char *) str);
str = NewString((char *) _str);
}
Seek(str, 0, SEEK_SET);
line = Getline(str);