Remove %apply for size_t; add %typecheck for size_t and ptrdiff_t

directly.  This fixes warnings in test case wrapmacro.

Add %typecheck for SWIGTYPE.  This fixes warnings in test cases
director_basic, extend_placement, overload_template,
template_default_arg, valuewrapper_opaque.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6941 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matthias Köppe 2005-02-13 12:30:39 +00:00
commit 5753fdb420

View file

@ -276,10 +276,6 @@ typedef unsigned long SCM;
%typemap (out) SCM "$result=$1;"; %typemap (out) SCM "$result=$1;";
%typecheck(SWIG_TYPECHECK_POINTER) SCM "$1=1;"; %typecheck(SWIG_TYPECHECK_POINTER) SCM "$1=1;";
/* Some ANSI C typemaps */
%apply unsigned long { size_t };
/* ------------------------------------------------------------ /* ------------------------------------------------------------
* String & length * String & length
* ------------------------------------------------------------ */ * ------------------------------------------------------------ */
@ -301,9 +297,13 @@ typedef unsigned long SCM;
unsigned int, unsigned short, unsigned long, unsigned int, unsigned short, unsigned long,
signed char, unsigned char, signed char, unsigned char,
long long, unsigned long long, long long, unsigned long long,
size_t, ptrdiff_t,
std::size_t, std::ptrdiff_t,
const int &, const short &, const long &, const int &, const short &, const long &,
const unsigned int &, const unsigned short &, const unsigned long &, const unsigned int &, const unsigned short &, const unsigned long &,
const long long &, const unsigned long long &, const long long &, const unsigned long long &,
const size_t &, const ptrdiff_t &,
const std::size_t &, const std::ptrdiff_t &,
enum SWIGTYPE enum SWIGTYPE
{ {
$1 = SCM_NFALSEP(scm_integer_p($input)) ? 1 : 0; $1 = SCM_NFALSEP(scm_integer_p($input)) ? 1 : 0;
@ -330,7 +330,7 @@ typedef unsigned long SCM;
$1 = SCM_STRINGP($input) ? 1 : 0; $1 = SCM_STRINGP($input) ? 1 : 0;
} }
%typecheck(SWIG_TYPECHECK_POINTER) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] { %typecheck(SWIG_TYPECHECK_POINTER) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE {
void *ptr; void *ptr;
$1 = !SWIG_ConvertPtr($input, &ptr, $1_descriptor, 0); $1 = !SWIG_ConvertPtr($input, &ptr, $1_descriptor, 0);
} }