nfft
nfft copied to clipboard
[Headers] Cleaning up functional macros?
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?