diff --git a/Lib/chicken/chicken.swg b/Lib/chicken/chicken.swg index 022380cc5..a94c7ae8c 100644 --- a/Lib/chicken/chicken.swg +++ b/Lib/chicken/chicken.swg @@ -437,15 +437,7 @@ $result = C_SCHEME_UNDEFINED; * ANSI C typemaps * ------------------------------------------------------------ */ -%typemap(in) size_t -%{ if (!C_swig_is_flonum ($input)) { - swig_barf (SWIG_BARF1_BAD_ARGUMENT_TYPE, "Argument #$argnum is not of type 'flonum'"); - } - $1 = (size_t) C_flonum_magnitude ($input); %} -%typemap(out) size_t = long; -%typemap(varin) size_t = long; -%typemap(varout) size_t = long; -%typemap(constcode) size_t = long; +%apply unsigned long { size_t }; /* ------------------------------------------------------------ * CHICKEN types diff --git a/Lib/csharp/csharp.swg b/Lib/csharp/csharp.swg index ac68a4a0e..9b0580832 100644 --- a/Lib/csharp/csharp.swg +++ b/Lib/csharp/csharp.swg @@ -514,7 +514,7 @@ using System.Runtime.InteropServices; /* Some ANSI C typemaps */ -%apply long { size_t }; +%apply unsigned long { size_t }; /* csharp keywords */ /* please test and activate */ diff --git a/Lib/guile/typemaps.i b/Lib/guile/typemaps.i index 75827d8fe..52884d14e 100644 --- a/Lib/guile/typemaps.i +++ b/Lib/guile/typemaps.i @@ -278,7 +278,7 @@ typedef unsigned long SCM; /* Some ANSI C typemaps */ -%apply long { size_t }; +%apply unsigned long { size_t }; /* ------------------------------------------------------------ * String & length diff --git a/Lib/java/java.swg b/Lib/java/java.swg index 8265ce402..977f39abc 100644 --- a/Lib/java/java.swg +++ b/Lib/java/java.swg @@ -972,7 +972,7 @@ /* Some ANSI C typemaps */ -%apply long { size_t }; +%apply unsigned long { size_t }; /* java keywords */ /* please test and activate */ diff --git a/Lib/modula3/modula3.swg b/Lib/modula3/modula3.swg index f6c3c7d1a..cd0f70f58 100644 --- a/Lib/modula3/modula3.swg +++ b/Lib/modula3/modula3.swg @@ -743,4 +743,4 @@ FROM BlaBla IMPORT Bla; /* Some ANSI C typemaps */ -%apply long { size_t }; +%apply unsigned long { size_t }; diff --git a/Lib/php4/php4.swg b/Lib/php4/php4.swg index 8019ac44f..323dfe2f3 100644 --- a/Lib/php4/php4.swg +++ b/Lib/php4/php4.swg @@ -499,7 +499,7 @@ deliberate error cos this code looks bogus to me /* Some ANSI C typemaps */ -%apply long { size_t }; +%apply unsigned long { size_t }; /* php kewords */ /* please test and activate */ diff --git a/Lib/ruby/rubymisctypes.swg b/Lib/ruby/rubymisctypes.swg index 499891559..2dd9d1e8b 100644 --- a/Lib/ruby/rubymisctypes.swg +++ b/Lib/ruby/rubymisctypes.swg @@ -2,5 +2,5 @@ * --- ANSI/Posix C/C++ types --- * ------------------------------------------------------------ */ -%apply long { size_t }; +%apply unsigned long { size_t }; diff --git a/Lib/tcl/tcl8.swg b/Lib/tcl/tcl8.swg index f07aa03cd..328bf3bed 100644 --- a/Lib/tcl/tcl8.swg +++ b/Lib/tcl/tcl8.swg @@ -462,14 +462,7 @@ * ANSI C typemaps * ------------------------------------------------------------ */ -%typemap(in) size_t (int temp) "if (Tcl_GetIntFromObj(interp,$input,&temp) == TCL_ERROR) return TCL_ERROR; - $1 = (size_t) temp;"; - -%typemap(out) size_t = long; -%typemap(varin) size_t = long; -%typemap(varout) size_t = long; -%typemap(consttab) size_t = long; - +%apply unsigned long { size_t }; /* ------------------------------------------------------------