warning/error fixes for Visual Studio

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-10-09 13:49:44 +00:00
commit ec75a4e978
4 changed files with 18 additions and 12 deletions

View file

@ -40,7 +40,7 @@
the necessary code to catch it and rethrow it to the python side.
*/
%typemap(throws) FullError "throw;";
%typemap(throws) FullError "(void)$1; throw;";
%exception *::enqueue {

View file

@ -7,12 +7,15 @@
class Defaults1 {
static const int PRIVATE_DEFAULT = -1;
public:
static const double PUBLIC_DEFAULT = -1.0;
static const double PUBLIC_DEFAULT;
Defaults1(int a = PRIVATE_DEFAULT) {}
double ret(double d = PUBLIC_DEFAULT) { return d; }
};
%}
%{
const double Defaults1::PUBLIC_DEFAULT = -1.0;
%}
// compactdefaultargs now on by default
%feature("compactdefaultargs");
@ -24,9 +27,12 @@ public:
class Defaults2 {
static const int PRIVATE_DEFAULT = -1;
public:
static const double PUBLIC_DEFAULT = -1.0;
static const double PUBLIC_DEFAULT;
Defaults2(int a = PRIVATE_DEFAULT) {}
double ret(double d = PUBLIC_DEFAULT) { return d; }
};
%}
%{
const double Defaults2::PUBLIC_DEFAULT = -1.0;
%}

View file

@ -48,7 +48,7 @@ private:
RCObjBase& operator=(const RCObjBase& );
friend class RCObj;
friend struct RCObj;
int add_ref() const
{

View file

@ -7,25 +7,25 @@
%typemap(varin) int "this_will_not_compile_varin "
%typemap(varout) int "this_will_not_compile_varout"
%typemap(varin) int globul "/*int globul varin */"
%typemap(varout) int globul "/*int globul varout*/"
%typemap(varout) int globul "/*int globul varout*/ $result=0;"
%typemap(varin) int Space::nspace "/*int nspace varin */"
%typemap(varout) int Space::nspace "/*int nspace varout*/"
%typemap(varout) int Space::nspace "/*int nspace varout*/ $result=0;"
//%typemap(varin) int member "/*int member varin */"
//%typemap(varout) int member "/*int member varout*/"
//%typemap(varout) int member "/*int member varout*/ $result=0;"
%typemap(varin) int Space::Struct::smember "/*int smember varin */"
%typemap(varout) int Space::Struct::smember "/*int smember varout*/"
%typemap(varout) int Space::Struct::smember "/*int smember varout*/ $result=0;"
// 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 */ $1=0;"
%typemap(out) int globul "/*int globul out*/"
%typemap(out) int globul "/*int globul out*/ $result=0;"
%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*/ $result=0;"
%typemap(in) int member "/*int member in */ $1=0;"
%typemap(out) int member "/*int member out*/"
%typemap(out) int member "/*int member out*/ $result=0;"
%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*/ $result=0;"
%typemap(javain) int "this_will_not_compile_javain "
%typemap(javaout) int "this_will_not_compile_javaout"