Various fixes for VC++7.1 and Sun Studio 10

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7257 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-06-03 21:25:00 +00:00
commit c09b7fa897
6 changed files with 14 additions and 14 deletions

View file

@ -30,7 +30,7 @@
%csnothrowexception NoThrowException() {
try {
$action
} catch(Ex e) {
} catch(Ex) {
// swallowed
}
}

View file

@ -18,13 +18,13 @@
// Statically typed languages use in/out for variables
%typemap(in) int "this_will_not_compile_in "
%typemap(out) int "this_will_not_compile_out"
%typemap(in) int globul "/*int globul in */"
%typemap(in) int globul "/*int globul in */ $1=0;"
%typemap(out) int globul "/*int globul out*/"
%typemap(in) int Space::nspace "/*int nspace in */"
%typemap(in) int Space::nspace "/*int nspace in */ $1=0;"
%typemap(out) int Space::nspace "/*int nspace out*/"
%typemap(in) int member "/*int member in */"
%typemap(in) int member "/*int member in */ $1=0;"
%typemap(out) int member "/*int member out*/"
%typemap(in) int Space::Struct::smember "/*int smember in */"
%typemap(in) int Space::Struct::smember "/*int smember in */ $1=0;"
%typemap(out) int Space::Struct::smember "/*int smember out*/"
%typemap(javain) int "this_will_not_compile_javain "

View file

@ -157,7 +157,7 @@ template<typename T> struct Base {
virtual IntegerPtr defaultargs(double d, int * a = 0) = 0;
static void StaticHidden() {}
void AmIAmINotVirtual() {}
IntegerPtr NotVirtual(IntegerPtr i) {}
IntegerPtr NotVirtual(IntegerPtr i) { return 0; }
virtual Base * covariant(int a = 0, int * i = 0) { return 0; }
typedef Base * BasePtr;
virtual BasePtr covariant2() { return 0; }
@ -172,7 +172,7 @@ template<typename T> struct Derived : Base<T> {
Double function() { return 0; }
int * defaultargs(Double d, IntegerPtr a = 0) { return 0; }
void AmIAmINotVirtual() {}
int * NotVirtual(int *i) {}
int * NotVirtual(int *i) { return 0; }
typedef Derived * DerivedPtr;
DerivedPtr covariant(int a = 0, IntegerPtr i = 0) { return 0; }
DerivedPtr covariant2() { return 0; }
@ -185,7 +185,7 @@ template<typename T> struct Bottom : Derived<T> {
int * method() const { return 0; }
static void StaticHidden() {}
void AmIAmINotVirtual() {}
IntegerPtr NotVirtual(IntegerPtr i) {}
IntegerPtr NotVirtual(IntegerPtr i) { return 0; }
void (*funcptr)(int a, bool b);
Bottom<T> * covariant(int a = 0, IntegerPtr i = 0) { return 0; }
Derived<T> * covariant2() { return 0; }

View file

@ -148,7 +148,7 @@ class Allocate : public Dispatcher {
String *base_returntype = function_return_type(base);
returntype_match = Strcmp(this_returntype, base_returntype) == 0 ? true : false;
if (!returntype_match) {
covariant_returntype = SwigType_issubtype(this_returntype, base_returntype);
covariant_returntype = SwigType_issubtype(this_returntype, base_returntype) ? true : false;
returntype_match = covariant_returntype;
}
@ -168,8 +168,8 @@ class Allocate : public Dispatcher {
this_fn = SwigType_typedef_resolve_all(this_fn);
if (Strcmp(base_fn, this_fn) == 0) {
// Finally check that the qualifiers match
bool base_qualifier = SwigType_isqualifier(resolved_decl);
bool this_qualifier = SwigType_isqualifier(base_decl);
int base_qualifier = SwigType_isqualifier(resolved_decl);
int this_qualifier = SwigType_isqualifier(base_decl);
if (base_qualifier == this_qualifier) {
decl_match = true;
}

View file

@ -1486,7 +1486,7 @@ class JAVA : public Language {
String *baseclass = NULL;
String *c_baseclassname = NULL;
String *typemap_lookup_type = Getattr(n,"classtypeobj");
bool feature_director = Swig_directorclass(n);
bool feature_director = Swig_directorclass(n) ? true : false;
/* Deal with inheritance */
List *baselist = Getattr(n,"bases");
@ -2793,7 +2793,7 @@ class JAVA : public Language {
sym_name, sym_name);
Printf(code_wrap->code, " (void)jcls;\n");
Printf(code_wrap->code, " if (director) {\n");
Printf(code_wrap->code, " director->swig_java_change_ownership(jenv, jself, jtake_or_release);\n");
Printf(code_wrap->code, " director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false);\n");
Printf(code_wrap->code, " }\n");
Printf(code_wrap->code, "}\n");

View file

@ -1407,7 +1407,7 @@ public:
emit_action(n,f);
if (directorsEnabled()) {
Printf(f->code, "} catch (Swig::DirectorException& e) {\n");
Printf(f->code, "} catch (Swig::DirectorException&) {\n");
Printf(f->code, " SWIG_fail;\n");
Printf(f->code, "}\n");
}