diff --git a/Lib/chicken/chicken.swg b/Lib/chicken/chicken.swg index 6429e182c..fc9aeacc3 100644 --- a/Lib/chicken/chicken.swg +++ b/Lib/chicken/chicken.swg @@ -480,12 +480,6 @@ $result = C_SCHEME_UNDEFINED; } } -/* ------------------------------------------------------------ - * ANSI C typemaps - * ------------------------------------------------------------ */ - -%apply unsigned long { size_t }; - /* ------------------------------------------------------------ * CHICKEN types * ------------------------------------------------------------ */ @@ -608,6 +602,12 @@ $result = C_SCHEME_UNDEFINED; SWIG_Chicken_ThrowException(ptr); } +/* ------------------------------------------------------------ + * ANSI C typemaps + * ------------------------------------------------------------ */ + +%apply unsigned long { size_t }; + /* ------------------------------------------------------------ * Overloaded operator support * ------------------------------------------------------------ */ diff --git a/Lib/perl5/noembed.h b/Lib/perl5/noembed.h index 6ea31faae..92a51aa60 100644 --- a/Lib/perl5/noembed.h +++ b/Lib/perl5/noembed.h @@ -64,4 +64,10 @@ #ifdef bool #undef bool #endif +#ifdef close + #undef close +#endif +#ifdef rewind + #undef rewind +#endif diff --git a/Lib/perl5/perl5.swg b/Lib/perl5/perl5.swg index fd38d4508..80c47397a 100644 --- a/Lib/perl5/perl5.swg +++ b/Lib/perl5/perl5.swg @@ -477,12 +477,6 @@ $2 = ($2_ltype) temp; } -/* ------------------------------------------------------------ - * ANSI C typemaps - * ------------------------------------------------------------ */ - -%apply unsigned long { size_t }; - /* ------------------------------------------------------------ * Typechecking rules * ------------------------------------------------------------ */ @@ -580,4 +574,10 @@ SWIG_croak($1); } +/* ------------------------------------------------------------ + * ANSI C typemaps + * ------------------------------------------------------------ */ + +%apply unsigned long { size_t }; + %include "perlinit.swg" diff --git a/Lib/tcl/tcl8.swg b/Lib/tcl/tcl8.swg index c030bda6f..89320eafa 100644 --- a/Lib/tcl/tcl8.swg +++ b/Lib/tcl/tcl8.swg @@ -503,19 +503,6 @@ $2 = ($2_ltype) temp; } -/* ------------------------------------------------------------ - * ANSI C typemaps - * ------------------------------------------------------------ */ - -%types(size_t); -%apply unsigned long { size_t }; -%apply const unsigned long& { const size_t& }; - -%types(ptrdiff_t); -%apply long { ptrdiff_t }; -%apply const long& { const ptrdiff_t& }; - - /* ------------------------------------------------------------ * Typechecking rules * ------------------------------------------------------------ */ @@ -644,6 +631,19 @@ SWIG_fail; } +/* ------------------------------------------------------------ + * ANSI C typemaps + * ------------------------------------------------------------ */ + +%types(size_t); +%apply unsigned long { size_t }; +%apply const unsigned long& { const size_t& }; + +%types(ptrdiff_t); +%apply long { ptrdiff_t }; +%apply const long& { const ptrdiff_t& }; + + // Some special reserved words in classes %include "tcl8kw.swg"