%typecheck fixes for size_t

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7666 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-10-15 22:23:55 +00:00
commit e7e06c38f4
4 changed files with 31 additions and 25 deletions

View file

@ -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
* ------------------------------------------------------------ */

View file

@ -64,4 +64,10 @@
#ifdef bool
#undef bool
#endif
#ifdef close
#undef close
#endif
#ifdef rewind
#undef rewind
#endif

View file

@ -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"

View file

@ -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"