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.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@76 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Loic Dachary 2000-01-13 15:13:59 +00:00
commit f96f0170f2
3 changed files with 9 additions and 3 deletions

View file

@ -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.

View file

@ -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);

View file

@ -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);