diff options
author | Tony Cook <tony@develop-help.com> | 2019-11-12 09:11:34 +1100 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-11-16 16:07:35 -0800 |
commit | 065d0f135e6d1aa6fab37115ee55247e06a9b832 (patch) | |
tree | 8a9a5223f85b7d64be1bd53a0ebc7b62d0e1367f /pp_ctl.c | |
parent | 16b18492a3b13a32fa4c894a24245b7f615366e4 (diff) | |
download | perl-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.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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 */ |