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
This commit is contained in:
parent
1c8618d635
commit
8f8804b7a1
2 changed files with 5 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue