From 8f8804b7a1b949786c6366494786efb14ea8713a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 17 Aug 2010 19:10:14 +0000 Subject: [PATCH] Fix corner case marshalling of doubles - errno was not being correctly set before calling strtod - patch from Justin Vallon git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12190 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CHANGES.current | 4 ++++ Lib/perl5/perlprimtypes.swg | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGES.current b/CHANGES.current index d24f6c312..e4022a642 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release. Version 2.0.1 (in progress) =========================== +2010-08-17: wsfulton + [Perl] Fix corner case marshalling of doubles - errno was not being correctly + set before calling strtod - patch from Justin Vallon. + 2010-08-17: wsfulton Fix make distclean when some of the more obscure languages are detected by configure - fixes from Torsten Landschoff. diff --git a/Lib/perl5/perlprimtypes.swg b/Lib/perl5/perlprimtypes.swg index ae7bb3886..f2a614030 100644 --- a/Lib/perl5/perlprimtypes.swg +++ b/Lib/perl5/perlprimtypes.swg @@ -311,6 +311,7 @@ SWIG_AsVal_dec(double)(SV *obj, double *val) const char *nptr = SvPV_nolen(obj); if (nptr) { char *endptr; + errno = 0; double v = strtod(nptr, &endptr); if (errno == ERANGE) { errno = 0;