Skip to content

Conversation

minefreak19
Copy link
Contributor

This way, NOB_STRIP_PREFIX_GUARD_ is not defined until the prefixes are actually stripped, so a header file can simply #include "nob.h" without polluting the namespace while the corresponding C file can #define NOB_STRIP_PREFIX and re-include nob.h to use the short names.

#include "header_that_includes_nob.h"

// now this define doesn't need to be at the top of the file
#define NOB_STRIP_PREFIX
#include "nob.h"

// ...

This way, NOB_STRIP_PREFIX_GUARD_ is not defined until the prefixes are
actually stripped, so a header file can simply `#include "nob.h"`
without polluting the namespace while the corresponding C file can
`#define NOB_STRIP_PREFIX` and re-include nob.h to use the short names.
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.

1 participant