tcl long long overloading fix - bug #1191835, patch from Jeroen Dobbelaere

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7202 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-05-20 23:51:31 +00:00
commit b417ef575e
2 changed files with 16 additions and 2 deletions

View file

@ -108,6 +108,13 @@ static char *bar(void *) {
};
%}
%inline %{
void ull() {}
void ull(unsigned long long ull) {}
void ll() {}
void ll(long long ull) {}
%}
%include cmalloc.i
%malloc(void);

View file

@ -481,10 +481,8 @@
int, short, long,
unsigned int, unsigned short, unsigned long,
signed char, unsigned char,
long long, unsigned long long,
const int &, const short &, const long &,
const unsigned int &, const unsigned short &, const unsigned long &,
const long long &, const unsigned long long &,
enum SWIGTYPE, const enum SWIGTYPE &,
bool, const bool &
{
@ -493,6 +491,15 @@
else $1 = 1;
}
%typecheck(SWIG_TYPECHECK_INTEGER)
long long, unsigned long long,
const long long &, const unsigned long long &
{
Tcl_WideInt tmp;
if (Tcl_GetWideIntFromObj(NULL,$input,&tmp) == TCL_ERROR) $1 = 0;
else $1 = 1;
}
%typecheck(SWIG_TYPECHECK_DOUBLE)
float, double,
const float &, const double &