Added functions to support preprocessor enhancement.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5296 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2003-11-11 20:16:11 +00:00
commit 114a8edfbb

View file

@ -68,6 +68,37 @@ Swig_add_directory(const String_or_char *dirname) {
Append(directories, dirname);
}
/* -----------------------------------------------------------------------------
* Swig_push_directory()
*
* Inserts a directory at the front of the SWIG search path. This is used by
* the preprocessor to grab files in the same directory as other included files.
* ----------------------------------------------------------------------------- */
void
Swig_push_directory(const String_or_char *dirname) {
if (!directories) directories = NewList();
assert(directories);
if (!DohIsString(dirname)) {
dirname = NewString((char *) dirname);
assert(dirname);
}
Insert(directories, 0, dirname);
}
/* -----------------------------------------------------------------------------
* Swig_pop_directory()
*
* Pops a directory off the front of the SWIG search path. This is used by
* the preprocessor.
* ----------------------------------------------------------------------------- */
void
Swig_pop_directory() {
if (!directories) return;
Delitem(directories,0);
}
/* -----------------------------------------------------------------------------
* Swig_last_file()
*