diff options
-rw-r--r-- | CHANGES | 6 | ||||
-rw-r--r-- | Source/Modules1.1/java.cxx | 4 | ||||
-rw-r--r-- | Source/SWIG1.1/main.cxx | 2 |
3 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,11 @@ SWIG (Simplified Wrapper and Interface Generator) +1/13/00 : loic + Source/Modules1.1/java.cxx: fixed char* -> const char* warnings that are + errors when compiling with gcc-2.95.2 + Source/SWIG1.1/main.cxx: cast const char* to char* for String_replace + token and rep should really be const. + 1/12/00 : beazley Added Harco's Java modules. diff --git a/Source/Modules1.1/java.cxx b/Source/Modules1.1/java.cxx index de1dc2c52..37870a6d5 100644 --- a/Source/Modules1.1/java.cxx +++ b/Source/Modules1.1/java.cxx @@ -623,7 +623,7 @@ void JAVA::create_function(char *name, char *iname, DataType *t, ParmList *l) char *scalarType = SwigTcToJniScalarType(p->t); char *cptrtype = p->t->print_type(); p->t->is_pointer--; - char *basic_jnitype = (p->t->is_pointer > 0) ? "jlong" : SwigTcToJniType(p->t, 0); + const char *basic_jnitype = (p->t->is_pointer > 0) ? "jlong" : SwigTcToJniType(p->t, 0); char *ctype = p->t->print_type(); if(scalarType == NULL || basic_jnitype == NULL) { fprintf(stderr, "\'%s\' does not have a in/jni typemap, and is not a basic type.\n", ctype); @@ -687,7 +687,7 @@ void JAVA::create_function(char *name, char *iname, DataType *t, ParmList *l) char *scalarType = SwigTcToJniScalarType(p->t); char *cptrtype = p->t->print_type(); p->t->is_pointer--; - char *basic_jnitype = (p->t->is_pointer > 0) ? "jlong" : SwigTcToJniType(p->t, 0); + const char *basic_jnitype = (p->t->is_pointer > 0) ? "jlong" : SwigTcToJniType(p->t, 0); char *ctype = p->t->print_type(); if(scalarType == NULL || basic_jnitype == NULL) { fprintf(stderr, "\'%s\' does not have a argout/jni typemap, and is not a basic type.\n", ctype); diff --git a/Source/SWIG1.1/main.cxx b/Source/SWIG1.1/main.cxx index dc45f1288..34cf2c745 100644 --- a/Source/SWIG1.1/main.cxx +++ b/Source/SWIG1.1/main.cxx @@ -167,7 +167,7 @@ int SWIG_main(int argc, char *argv[], Language *l, Documentation *d) { SWIG_mark_arg(i); } else if (strncmp(argv[i],"-D",2) == 0) { DOH *d = NewString(argv[i]+2); - String_replace(d,"="," ", DOH_REPLACE_ANY | DOH_REPLACE_FIRST); + String_replace(d,(char*)"=",(char*)" ", DOH_REPLACE_ANY | DOH_REPLACE_FIRST); SWIG_cpp_define((DOH *) d,0); // Create a symbol SWIG_mark_arg(i); |