Drop the C shim for float formatting now that jsonpull is C++

json_print_one() reached fpfmt through dtoa_shortest(), a C-linkage
wrapper in text.cpp that strdup()ed the formatted string so the C
jsonpull could take it and free() it. jsonpull has been C++ since 4f26211,
so it can append the std::string directly and skip the copy, the
allocation, and the free.

That was the shim's only caller, so fpfmt/fpfmt.h goes away with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014wJRAuhMninQE4wK2TUfuZ
This commit is contained in:
Claude
2026-08-31 00:28:48 +00:00
parent 7127e49c86
commit dda7276815
4 changed files with 5 additions and 31 deletions
+3 -1
View File
@@ -9,7 +9,9 @@
final digit (`9.823748927348929e+55` becomes `9.823748927348928e+55`). Every
such value still parses back to exactly the same double, so this changes only
the spelling, never the number. `make fpfmt-bench` rebuilds the head-to-head
comparison against the old implementation.
comparison against the old implementation. `jsonpull`, now that it is C++,
calls `fpfmt::dtoa()` directly rather than through the `strdup`ing C shim
that `milo/milo.h` used to declare.
# 2.82.0