This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Gconvert actually takes type NV, while nv may be either double
authorNicholas Clark <nick@ccl4.org>
Sat, 29 Nov 2003 14:44:22 +0000 (14:44 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 29 Nov 2003 14:44:22 +0000 (14:44 +0000)
or long double (depending on some conditional code)
Rafael and I think that this cast should work.

p4raw-id: //depot/perl@21804

sv.c

diff --git a/sv.c b/sv.c
index 16c7bbc..3a05916 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -9361,7 +9361,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV
            if ( !(width || left || plus || alt) && fill != '0'
                 && has_precis && intsize != 'q' ) {    /* Shortcuts */
                if ( c == 'g') {
-                   Gconvert(nv, precis, 0, PL_efloatbuf);
+                   Gconvert((NV)nv, precis, 0, PL_efloatbuf);
                    if (*PL_efloatbuf)  /* May return an empty string for digits==0 */
                        goto float_converted;
                } else if ( c == 'f' && !precis) {