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:
parent
b6b35e2e71
commit
c09b7fa897
6 changed files with 14 additions and 14 deletions
|
|
@ -30,7 +30,7 @@
|
||||||
%csnothrowexception NoThrowException() {
|
%csnothrowexception NoThrowException() {
|
||||||
try {
|
try {
|
||||||
$action
|
$action
|
||||||
} catch(Ex e) {
|
} catch(Ex) {
|
||||||
// swallowed
|
// swallowed
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@
|
||||||
// Statically typed languages use in/out for variables
|
// Statically typed languages use in/out for variables
|
||||||
%typemap(in) int "this_will_not_compile_in "
|
%typemap(in) int "this_will_not_compile_in "
|
||||||
%typemap(out) int "this_will_not_compile_out"
|
%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(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(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(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(out) int Space::Struct::smember "/*int smember out*/"
|
||||||
|
|
||||||
%typemap(javain) int "this_will_not_compile_javain "
|
%typemap(javain) int "this_will_not_compile_javain "
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@ template<typename T> struct Base {
|
||||||
virtual IntegerPtr defaultargs(double d, int * a = 0) = 0;
|
virtual IntegerPtr defaultargs(double d, int * a = 0) = 0;
|
||||||
static void StaticHidden() {}
|
static void StaticHidden() {}
|
||||||
void AmIAmINotVirtual() {}
|
void AmIAmINotVirtual() {}
|
||||||
IntegerPtr NotVirtual(IntegerPtr i) {}
|
IntegerPtr NotVirtual(IntegerPtr i) { return 0; }
|
||||||
virtual Base * covariant(int a = 0, int * i = 0) { return 0; }
|
virtual Base * covariant(int a = 0, int * i = 0) { return 0; }
|
||||||
typedef Base * BasePtr;
|
typedef Base * BasePtr;
|
||||||
virtual BasePtr covariant2() { return 0; }
|
virtual BasePtr covariant2() { return 0; }
|
||||||
|
|
@ -172,7 +172,7 @@ template<typename T> struct Derived : Base<T> {
|
||||||
Double function() { return 0; }
|
Double function() { return 0; }
|
||||||
int * defaultargs(Double d, IntegerPtr a = 0) { return 0; }
|
int * defaultargs(Double d, IntegerPtr a = 0) { return 0; }
|
||||||
void AmIAmINotVirtual() {}
|
void AmIAmINotVirtual() {}
|
||||||
int * NotVirtual(int *i) {}
|
int * NotVirtual(int *i) { return 0; }
|
||||||
typedef Derived * DerivedPtr;
|
typedef Derived * DerivedPtr;
|
||||||
DerivedPtr covariant(int a = 0, IntegerPtr i = 0) { return 0; }
|
DerivedPtr covariant(int a = 0, IntegerPtr i = 0) { return 0; }
|
||||||
DerivedPtr covariant2() { return 0; }
|
DerivedPtr covariant2() { return 0; }
|
||||||
|
|
@ -185,7 +185,7 @@ template<typename T> struct Bottom : Derived<T> {
|
||||||
int * method() const { return 0; }
|
int * method() const { return 0; }
|
||||||
static void StaticHidden() {}
|
static void StaticHidden() {}
|
||||||
void AmIAmINotVirtual() {}
|
void AmIAmINotVirtual() {}
|
||||||
IntegerPtr NotVirtual(IntegerPtr i) {}
|
IntegerPtr NotVirtual(IntegerPtr i) { return 0; }
|
||||||
void (*funcptr)(int a, bool b);
|
void (*funcptr)(int a, bool b);
|
||||||
Bottom<T> * covariant(int a = 0, IntegerPtr i = 0) { return 0; }
|
Bottom<T> * covariant(int a = 0, IntegerPtr i = 0) { return 0; }
|
||||||
Derived<T> * covariant2() { return 0; }
|
Derived<T> * covariant2() { return 0; }
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ class Allocate : public Dispatcher {
|
||||||
String *base_returntype = function_return_type(base);
|
String *base_returntype = function_return_type(base);
|
||||||
returntype_match = Strcmp(this_returntype, base_returntype) == 0 ? true : false;
|
returntype_match = Strcmp(this_returntype, base_returntype) == 0 ? true : false;
|
||||||
if (!returntype_match) {
|
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;
|
returntype_match = covariant_returntype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -168,8 +168,8 @@ class Allocate : public Dispatcher {
|
||||||
this_fn = SwigType_typedef_resolve_all(this_fn);
|
this_fn = SwigType_typedef_resolve_all(this_fn);
|
||||||
if (Strcmp(base_fn, this_fn) == 0) {
|
if (Strcmp(base_fn, this_fn) == 0) {
|
||||||
// Finally check that the qualifiers match
|
// Finally check that the qualifiers match
|
||||||
bool base_qualifier = SwigType_isqualifier(resolved_decl);
|
int base_qualifier = SwigType_isqualifier(resolved_decl);
|
||||||
bool this_qualifier = SwigType_isqualifier(base_decl);
|
int this_qualifier = SwigType_isqualifier(base_decl);
|
||||||
if (base_qualifier == this_qualifier) {
|
if (base_qualifier == this_qualifier) {
|
||||||
decl_match = true;
|
decl_match = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1486,7 +1486,7 @@ class JAVA : public Language {
|
||||||
String *baseclass = NULL;
|
String *baseclass = NULL;
|
||||||
String *c_baseclassname = NULL;
|
String *c_baseclassname = NULL;
|
||||||
String *typemap_lookup_type = Getattr(n,"classtypeobj");
|
String *typemap_lookup_type = Getattr(n,"classtypeobj");
|
||||||
bool feature_director = Swig_directorclass(n);
|
bool feature_director = Swig_directorclass(n) ? true : false;
|
||||||
|
|
||||||
/* Deal with inheritance */
|
/* Deal with inheritance */
|
||||||
List *baselist = Getattr(n,"bases");
|
List *baselist = Getattr(n,"bases");
|
||||||
|
|
@ -2793,7 +2793,7 @@ class JAVA : public Language {
|
||||||
sym_name, sym_name);
|
sym_name, sym_name);
|
||||||
Printf(code_wrap->code, " (void)jcls;\n");
|
Printf(code_wrap->code, " (void)jcls;\n");
|
||||||
Printf(code_wrap->code, " if (director) {\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");
|
||||||
Printf(code_wrap->code, "}\n");
|
Printf(code_wrap->code, "}\n");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1407,7 +1407,7 @@ public:
|
||||||
emit_action(n,f);
|
emit_action(n,f);
|
||||||
|
|
||||||
if (directorsEnabled()) {
|
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, " SWIG_fail;\n");
|
||||||
Printf(f->code, "}\n");
|
Printf(f->code, "}\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue