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

Allow static implementation #304

Open
ListeriaM opened this issue Aug 15, 2024 · 0 comments
Open

Allow static implementation #304

ListeriaM opened this issue Aug 15, 2024 · 0 comments

Comments

@ListeriaM
Copy link

ListeriaM commented Aug 15, 2024

From stb_howto:

Have a #define which makes function declarations and function definitions static.

Being able to add storage-class specifiers is not only useful in the context mentioned in the linked docs, but also for creating a static library that uses qoi.h but doesn't expose its symbols (see raysan5/raylib#4207), and may allow a compiler to generate better code.

For example, having implemented it in a fork and using it (and STBIDEF) in qoiconv and qoibench had their sizes drop drastically (from 216k and 234k to 75k and 109k respectively).

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

No branches or pull requests

1 participant