fix type cast

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9033 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-03-26 07:04:06 +00:00
commit 6a69ec8227

View file

@ -73,7 +73,7 @@ SWIG_AsVal_dec(unsigned long)(Tcl_Obj *obj, unsigned long *val) {
long v;
if (Tcl_GetLongFromObj(0,obj, &v) == TCL_OK) {
if (v >= 0) {
if (val) *val = (long) v;
if (val) *val = (unsigned long) v;
return SWIG_OK;
} else {
return SWIG_OverflowError;