avoid extra call to SvUV

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7943 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-12-07 22:23:15 +00:00
commit b062ac7982

View file

@ -2,7 +2,6 @@
* Primitive Types
* ------------------------------------------------------------ */
/* long */
%fragment(SWIG_From_frag(long),"header") {
@ -49,7 +48,7 @@ SWIG_AsVal_dec(unsigned long)(SV *obj, unsigned long *val)
} else if (SvIOK(obj)) {
long v = SvIV(obj);
if (v > 0) {
if (val) *val = SvUV(obj);
if (val) *val = v;
return SWIG_OK;
} else {
return SWIG_OverflowError;