News for hackers. Stuff that matters.
Re:Uthash – C macros for hash tables and more by david2ndaccount on Saturday March 26, 2022 @03:32AM (#30810006)
Don’t use macros for this. The better way to do it is to have headers that are designed to be included multiple times, each time with a different type. You end up with code that is possible to step through in a debugger instead of a macro-expanded mess.
Re:Uthash – C macros for hash tables and more by eqvinox on Saturday March 26, 2022 @03:57AM (#30810095)
I really wish there was an _Include C preprocessor instruction for this purpose (like there is _Pragma)