From cd00d0106e3ec246384b7705bf2fed98724428f2 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 15 Nov 2004 20:56:37 +0000 Subject: [PATCH] more fixes for size_t git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6731 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Lib/tcl/std_common.i | 2 +- SWIG/Lib/tcl/tcl8.swg | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/SWIG/Lib/tcl/std_common.i b/SWIG/Lib/tcl/std_common.i index 07ed60116..9d3df61c8 100644 --- a/SWIG/Lib/tcl/std_common.i +++ b/SWIG/Lib/tcl/std_common.i @@ -6,7 +6,7 @@ // Tcl implementation %types(std::size_t); -%apply unsigned long { std::size_t }; +%apply size_t { std::size_t }; %apply const unsigned long& { const std::size_t& }; %types(std::ptrdiff_t); diff --git a/SWIG/Lib/tcl/tcl8.swg b/SWIG/Lib/tcl/tcl8.swg index fb9d0d15f..a0e03cbb1 100644 --- a/SWIG/Lib/tcl/tcl8.swg +++ b/SWIG/Lib/tcl/tcl8.swg @@ -79,14 +79,14 @@ /* Constant references. Passed by value */ /* Const primitive references. Passed by value */ -%typemap(in) const int & (int temp), - const short & (short temp), - const long & (long temp), - const unsigned int & (unsigned int temp), - const unsigned short & (unsigned short temp), - const unsigned long & (unsigned long temp), - const signed char & (signed char temp), - const unsigned char & (unsigned char temp) +%typemap(in) const int & ($basetype temp), + const short & ($basetype temp), + const long & ($basetype temp), + const unsigned int & ($basetype temp), + const unsigned short & ($basetype temp), + const unsigned long & ($basetype temp), + const signed char & ($basetype temp), + const unsigned char & ($basetype temp) { long ltemp; if (Tcl_GetLongFromObj(interp, $input, <emp) != TCL_OK) { @@ -464,9 +464,11 @@ %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& }; /* ------------------------------------------------------------