Added support for accepting the Unix directory separator '/' on Windows and the Mac
in addition to the native one ( '\' on Windows). This can be used in %import, %include and commandline options taking a path, for example -I. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5538 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
121f9b5740
commit
a998837604
1 changed files with 4 additions and 0 deletions
|
|
@ -492,6 +492,10 @@ get_filename(String *str) {
|
|||
while (((c = Getc(str)) != EOF) && (!isspace(c))) Putc(c,fn);
|
||||
if (isspace(c)) Ungetc(c,str);
|
||||
}
|
||||
#if defined(_WIN32) || defined(MACSWIG)
|
||||
/* accept Unix file separator on non-Unix systems */
|
||||
Replaceall(fn, "/", SWIG_FILE_DELIMETER);
|
||||
#endif
|
||||
Seek(fn,0,SEEK_SET);
|
||||
return fn;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue