diff --git a/Lib/scilab/sciexception.swg b/Lib/scilab/sciexception.swg index 5135cab9c..d9a8fbeb9 100644 --- a/Lib/scilab/sciexception.swg +++ b/Lib/scilab/sciexception.swg @@ -11,7 +11,9 @@ long&, unsigned long&, signed long&, short&, unsigned short&, signed short&, long long&, unsigned long long&, - unsigned char&, signed char& { + unsigned char&, signed char&, + size_t, size_t&, + ptrdiff_t, ptrdiff_t& { char obj[20]; sprintf(obj, "%d", $1); %raise(obj, "$type", $descriptor); @@ -30,10 +32,23 @@ %raise(obj, "$type", $descriptor); } +%typemap(throws, noblock=1) bool, bool& { + %raise($1 ? "true" : "false", "$type", $descriptor); +} + %typemap(throws, noblock=1) char*, char[ANY] { %raise($1, "$type", $descriptor); } +%typemap(throws, noblock=1) char, char& { + char obj[1]; + sprintf(obj, "%c", $1); + %raise(obj, "$type", $descriptor); +} + + + + %typemap(throws, noblock=1) SWIGTYPE, SWIGTYPE*, SWIGTYPE [ANY],