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
This commit is contained in:
parent
cb1ec493ab
commit
2292d549fd
1 changed files with 3 additions and 2 deletions
|
|
@ -365,7 +365,8 @@ SWIG_GetConstant(const char *key) {
|
||||||
SWIGRUNTIME(int)
|
SWIGRUNTIME(int)
|
||||||
SWIG_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...)
|
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;
|
double tempd;
|
||||||
const char *c;
|
const char *c;
|
||||||
va_list ap;
|
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 'l': case 'L':
|
||||||
case 'h': case 'H':
|
case 'h': case 'H':
|
||||||
case 'b': case 'B':
|
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;
|
if ((*c == 'i') || (*c == 'I')) *((int *)vptr) = tempi;
|
||||||
else if ((*c == 'l') || (*c == 'L')) *((long *)vptr) = tempi;
|
else if ((*c == 'l') || (*c == 'L')) *((long *)vptr) = tempi;
|
||||||
else if ((*c == 'h') || (*c == 'H')) *((short*)vptr) = tempi;
|
else if ((*c == 'h') || (*c == 'H')) *((short*)vptr) = tempi;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue