*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@73 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d988d8b735
commit
62653fd529
8 changed files with 22 additions and 19 deletions
|
|
@ -55,7 +55,7 @@ void GUILE::parse_args(int argc, char *argv[]) {
|
|||
}
|
||||
// Add a symbol for this module
|
||||
|
||||
add_symbol("SWIGGUILE",0,0);
|
||||
SWIG_cpp_define((void *) "SWIGGUILE",0);
|
||||
|
||||
// Set name of typemaps
|
||||
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ void JAVA::parse_args(int argc, char *argv[]) {
|
|||
|
||||
// Add a symbol to the parser for conditional compilation
|
||||
// cpp::define("SWIGJAVA");
|
||||
add_symbol("SWIGJAVA", 0, 0);
|
||||
SWIG_cpp_define((void *) "SWIGJAVA 1",0);
|
||||
|
||||
// Add typemap definitions
|
||||
typemap_lang = "java";
|
||||
|
|
|
|||
|
|
@ -186,8 +186,8 @@ PERL5::parse_args(int argc, char *argv[]) {
|
|||
}
|
||||
// Add a symbol for this module
|
||||
|
||||
add_symbol("SWIGPERL",0,0);
|
||||
add_symbol("SWIGPERL5",0,0);
|
||||
SWIG_cpp_define((void *) "SWIGPERL 1", 0);
|
||||
SWIG_cpp_define((void *) "SWIGPERL5 1", 0);
|
||||
|
||||
// Set name of typemaps
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ void PYTHON::parse_args(int argc, char *argv[]) {
|
|||
}
|
||||
}
|
||||
// Create a symbol for this language
|
||||
add_symbol("SWIGPYTHON",0,0);
|
||||
SWIG_cpp_define((void *) "SWIGPYTHON", 0);
|
||||
|
||||
// Set name of typemaps
|
||||
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ void TCL8::parse_args(int argc, char *argv[]) {
|
|||
|
||||
// Create a symbol SWIGTCL
|
||||
|
||||
add_symbol("SWIGTCL",0,0);
|
||||
add_symbol("SWIGTCL8",0,0);
|
||||
SWIG_cpp_define((void *) "SWIGTCL 1",0);
|
||||
SWIG_cpp_define((void *) "SWIGTCL8 1", 0);
|
||||
|
||||
// Set name of typemaps
|
||||
|
||||
|
|
|
|||
|
|
@ -101,6 +101,9 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) {
|
|||
try {
|
||||
#endif
|
||||
|
||||
// Initialize the preprocessor
|
||||
SWIG_cpp_init();
|
||||
|
||||
f_wrappers = 0;
|
||||
f_init = 0;
|
||||
f_header = 0;
|
||||
|
|
@ -117,12 +120,12 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) {
|
|||
// Set up some default symbols (available in both SWIG interface files
|
||||
// and C files)
|
||||
|
||||
add_symbol("SWIG",0,0); // Define the SWIG symbol
|
||||
SWIG_cpp_define((DOH *) "SWIG 1", 0);
|
||||
#ifdef MACSWIG
|
||||
add_symbol("SWIGMAC",0,0);
|
||||
SWIG_cpp_define((DOH *) "SWIGMAC 1", 0);
|
||||
#endif
|
||||
#ifdef SWIGWIN32
|
||||
add_symbol("SWIGWIN32",0,0);
|
||||
SWIG_cpp_define((DOH *) "SWIGWIN32 1", 0);
|
||||
#endif
|
||||
|
||||
// Check for SWIG_LIB environment variable
|
||||
|
|
@ -135,6 +138,7 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) {
|
|||
|
||||
SwigLib = copy_string(LibDir); // Make a copy of the real library location
|
||||
#ifdef MACSWIG
|
||||
/* This needs to be fixed */
|
||||
sprintf(temp,"%s:config", LibDir);
|
||||
add_directory(temp);
|
||||
add_directory(":swig_lib:config");
|
||||
|
|
@ -154,9 +158,6 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) {
|
|||
|
||||
libfiles = NewList();
|
||||
|
||||
// Initialize the preprocessor
|
||||
SWIG_cpp_init();
|
||||
|
||||
// Get options
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (argv[i]) {
|
||||
|
|
@ -167,9 +168,8 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) {
|
|||
} else if (strncmp(argv[i],"-D",2) == 0) {
|
||||
DOH *d = NewString(argv[i]+2);
|
||||
String_replace(d,"="," ", DOH_REPLACE_ANY | DOH_REPLACE_FIRST);
|
||||
SWIG_cpp_define(d,0);
|
||||
SWIG_cpp_define((DOH *) d,0);
|
||||
// Create a symbol
|
||||
add_symbol(argv[i]+2, (DataType *) 0, (char *) 0);
|
||||
SWIG_mark_arg(i);
|
||||
} else if (strcmp(argv[i],"-strict") == 0) {
|
||||
if (argv[i+1]) {
|
||||
|
|
@ -384,6 +384,10 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) {
|
|||
|
||||
sprintf(title,"%s", fn_runtime);
|
||||
|
||||
// Define the __cplusplus symbol
|
||||
if (CPlusPlus)
|
||||
SWIG_cpp_define((DOH *) "__cplusplus 1", 0);
|
||||
|
||||
// Open up files
|
||||
|
||||
/* Preprocess. Ugh */
|
||||
|
|
@ -461,10 +465,6 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) {
|
|||
delete temp_t;
|
||||
}
|
||||
|
||||
// Define the __cplusplus symbol
|
||||
if (CPlusPlus)
|
||||
add_symbol("__cplusplus",0,0);
|
||||
|
||||
// If in Objective-C mode. Load in a configuration file
|
||||
|
||||
if (ObjC) {
|
||||
|
|
|
|||
|
|
@ -569,6 +569,8 @@ extern "C" {
|
|||
extern void SWIG_mark_arg(int n);
|
||||
extern void SWIG_check_options();
|
||||
extern void SWIG_arg_error();
|
||||
|
||||
extern void *SWIG_cpp_define(void *, int);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -153,3 +153,4 @@ int update_symbol(char *name, DataType *type, char *value) {
|
|||
void remove_symbol(char *name) {
|
||||
SymHash.remove(name);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue