> How is this: > https://lists.nongnu.org/archive/html/freetype-commit/2020-07/msg00067.html > ?
Nice! However, I think it's better to have two versions of `SFD_ALLOC` and `SFD_FREE` depending on whether debugging is enabled or not. There should be zero overhead for the non-debugging case. Having two versions would also allow to use a function internally so that you can (a) avoid the `do {} while (0)` construction, and (b) still use the macro within a conditional. I imagine something like the following sketch. #ifdef DEBUGGING typedef struct SDF_MemoryUser_ { ... } ... FT_Pointer sdf_alloc(...) { ... } #define SDF_ALLOC ... #else #define SDF_ALLOC FT_QALLOC #endif Werner