summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2019-11-12 09:11:34 +1100
committerKarl Williamson <khw@cpan.org>2019-11-16 16:07:35 -0800
commit065d0f135e6d1aa6fab37115ee55247e06a9b832 (patch)
tree8a9a5223f85b7d64be1bd53a0ebc7b62d0e1367f /sv.c
parent16b18492a3b13a32fa4c894a24245b7f615366e4 (diff)
downloadperl-065d0f135e6d1aa6fab37115ee55247e06a9b832.tar.gz
clean up quadmath_format_*() functions
This includes: - remove them from the API - simplify quadmath_format_single()'s interface, and rename it to match the new interface fixes #17288
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sv.c b/sv.c
index 69ff0d7121..485755b8e9 100644
--- a/sv.c
+++ b/sv.c
@@ -13195,20 +13195,15 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p
GCC_DIAG_IGNORE_STMT(-Wformat-nonliteral);
#ifdef USE_QUADMATH
{
- const char* qfmt = quadmath_format_single(ptr);
- if (!qfmt)
+ if (!quadmath_format_valid(ptr))
Perl_croak_nocontext("panic: quadmath invalid format \"%s\"", ptr);
WITH_LC_NUMERIC_SET_TO_NEEDED_IN(in_lc_numeric,
elen = quadmath_snprintf(PL_efloatbuf, PL_efloatsize,
- qfmt, nv);
+ ptr, nv);
);
if ((IV)elen == -1) {
- if (qfmt != ptr)
- SAVEFREEPV(qfmt);
- Perl_croak_nocontext("panic: quadmath_snprintf failed, format \"%s\"", qfmt);
+ Perl_croak_nocontext("panic: quadmath_snprintf failed, format \"%s\"", ptr);
}
- if (qfmt != ptr)
- Safefree(qfmt);
}
#elif defined(HAS_LONG_DOUBLE)
WITH_LC_NUMERIC_SET_TO_NEEDED_IN(in_lc_numeric,