From 2292d549fd62cd5ab1b12a3d16c59cf39b693b92 Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Fri, 15 Aug 2003 17:47:33 +0000 Subject: [PATCH] Fixed [ 787432 ] long param handled as int git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4996 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/tcl/swigtcl8.swg | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/tcl/swigtcl8.swg b/Lib/tcl/swigtcl8.swg index 0817b4ec5..4776e079e 100644 --- a/Lib/tcl/swigtcl8.swg +++ b/Lib/tcl/swigtcl8.swg @@ -365,7 +365,8 @@ SWIG_GetConstant(const char *key) { SWIGRUNTIME(int) SWIG_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...) { - int argno = 0, opt = 0, tempi; + int argno = 0, opt = 0; + long tempi; double tempd; const char *c; va_list ap; @@ -402,7 +403,7 @@ SWIG_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fm case 'l': case 'L': case 'h': case 'H': case 'b': case 'B': - if (Tcl_GetIntFromObj(interp,obj,&tempi) != TCL_OK) goto argerror; + if (Tcl_GetLongFromObj(interp,obj,&tempi) != TCL_OK) goto argerror; if ((*c == 'i') || (*c == 'I')) *((int *)vptr) = tempi; else if ((*c == 'l') || (*c == 'L')) *((long *)vptr) = tempi; else if ((*c == 'h') || (*c == 'H')) *((short*)vptr) = tempi;