Skip to content

Conversation

GioseaxMC
Copy link

@GioseaxMC GioseaxMC commented Aug 15, 2025

Added nob(), Nob() and NOB() macros for automatic prefixing, to avoid manually adding stuff to the list of macros at the end of file.

The system is completely independent from the existing stripping system as it can be considered just an extension.

void nob(print) (char* mes) {
    printf("> %s\n", mes);
}

void main() {
    nob(print)("This always compiles");
    nob_print("This compiles only without NOB_STRIP_PREFIX defined");
}

the code above will declare the nob_print function or the print function.

@GioseaxMC GioseaxMC changed the title Add automatic prefix handling Add automatic prefix handling + test file Aug 15, 2025
@yuI4140
Copy link
Contributor

yuI4140 commented Aug 15, 2025

You need to add the test name into nob.c list of tests, for run it.

@GioseaxMC
Copy link
Author

You need to add the test name into nob.c list of tests, for run it.

will do thank you!

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.

2 participants