Our great sponsors
-
Yes, this is the de facto method. Often with custom memory allocators the author will match their function signatures with malloc, free, realloc, and calloc so that allocators can be swapped in and out with the preprocessor. For example, the SDS library expects this in sdsalloc.h.
-
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
Yea, bit annoying to do that, especially in a large project some vectors need to be static some need to be exposed in the API. In my mind the best solution is to add another macro parameter that lets the user change the function scope on the fly. See the vector used in the permafrost engine (a fellow redditor); when I first saw how he wrote his template macros it was a game changing trick.
Related posts
- Permafrost engine – An OpenGL RTS game engine written in C
- Show HN: I wrote my own RTS game engine in 70k SLOC of C
- Show HN: I wrote my own RTS game engine in 70k SLOC of C
- I wrote my own RTS game engine in 70k SLOC of C
- EVERGLORY - my one-man open-source passion project RTS - gets a new trailer and a Linux demo!