Fixed [ 787432 ] long param handled as int
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4996 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4541154043
commit
7b52266e7d
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue