From b062ac7982e3c4fb5200a44c675d0a738ed46395 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Wed, 7 Dec 2005 22:23:15 +0000 Subject: [PATCH] avoid extra call to SvUV git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7943 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/perl5/perlprimtypes.swg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Lib/perl5/perlprimtypes.swg b/Lib/perl5/perlprimtypes.swg index 4a87c45a4..139a61f43 100644 --- a/Lib/perl5/perlprimtypes.swg +++ b/Lib/perl5/perlprimtypes.swg @@ -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;