1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

Reduced ieee754 parser size (#4154)

Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
Anna Antonenko
2025-03-31 08:24:27 +04:00
committed by GitHub
parent 54adc38b3a
commit 79bb24406e
8 changed files with 74 additions and 6 deletions

View File

@@ -0,0 +1,14 @@
#include "wrappers.h"
// Based on the disassembly, providing NULL as `locale` is fine.
// The default `strtof` and `strtod` provided in the same libc_nano also just
// call these functions, but with an actual locale structure which was taking up
// lots of .data space (364 bytes).
float __wrap_strtof(const char* in, char** tail) {
return strtof_l(in, tail, NULL);
}
double __wrap_strtod(const char* in, char** tail) {
return strtod_l(in, tail, NULL);
}