summaryrefslogtreecommitdiff
path: root/pp_ctl.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 /pp_ctl.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 'pp_ctl.c')
-rw-r--r--pp_ctl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index ec08078d2a..32538519a6 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -881,15 +881,12 @@ PP(pp_formline)
arg &= ~(FORM_NUM_POINT|FORM_NUM_BLANK);
#ifdef USE_QUADMATH
{
- const char* qfmt = quadmath_format_single(fmt);
int len;
- if (!qfmt)
+ if (!quadmath_format_valid(fmt))
Perl_croak_nocontext("panic: quadmath invalid format \"%s\"", fmt);
- len = quadmath_snprintf(t, max, qfmt, (int) fieldsize, (int) arg, value);
+ len = quadmath_snprintf(t, max, fmt, (int) fieldsize, (int) arg, value);
if (len == -1)
- Perl_croak_nocontext("panic: quadmath_snprintf failed, format \"%s\"", qfmt);
- if (qfmt != fmt)
- Safefree(fmt);
+ Perl_croak_nocontext("panic: quadmath_snprintf failed, format \"%s\"", fmt);
}
#else
/* we generate fmt ourselves so it is safe */