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

[Headers] Cleaning up functional macros? #130

Open
kevinmatthes opened this issue Nov 4, 2021 · 0 comments
Open

[Headers] Cleaning up functional macros? #130

kevinmatthes opened this issue Nov 4, 2021 · 0 comments

Comments

@kevinmatthes
Copy link
Contributor

Sometimes, it is a good idea to tidy up internal macros somehow in order to avoid name clashes in case the macro should be defined already in another dependency. Furthermore, this avoids unnecessary failures when the library is used since the macros are not available anymore for the users who could intend to use the macros in the way they saw it in the library's source code but do not mind the macros' contexts completely by accident and, hence, wonder what causes their problems during the build processes of their projects.

A cleaning up can be processed very easy depending on options (-D) passed to the compiler such that, when the symbolic constant is not already defined, the macros will be removed properly (#undef) in order to avoid the described problems. When compiling the library, they should be passed as a further flag in order to make the macros work as they should do for their internal tasks.

When looking at the headers, I tried to find such a security feature but, unfortunately, I did not succeed, yet. I assume that I just not found the cleaning routine of the macros at the first sight.

Should we rather add further cleaning routines, just to be sure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant