Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove snprintf/strncat/strlen from fp_ident #33

Merged
merged 3 commits into from
Oct 16, 2024

Conversation

ryancdotorg
Copy link
Contributor

fp_ident is the only place tomsfast math uses string manipulation functions when built as a library. This commit replaces them with safe, trivial functions for concatenating static strings and numbers together.

This is a smaller part of a patchset to allow tomsfastmath to be compiled without stdlib, e.g. for freestanding webassembly.

ryancdotorg and others added 3 commits September 21, 2024 14:30
fp_ident is the only place tomsfast math uses string manipulation
functions when built as a library. This commit replaces them with
safe, trivial functions for concatonating static strings and numbers
together.
* do error checking.
* also print `SIZEOF_FP_DIGIT` and `DIGIT_SHIFT`.
* cut static buffer in half, currently the output string is 183 chars
  on my machine, so it's still more than enough for all the other options.

Signed-off-by: Steffen Jaeckel <[email protected]>
@sjaeckel
Copy link
Member

I took the liberty to force-push after incorporating some changes. I hope that's fine with you? :)

Copy link
Collaborator

@levitte levitte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sum total of changes look good to me

@sjaeckel sjaeckel merged commit 6a5d01c into libtom:develop Oct 16, 2024
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants