[PATCH 01/15] util: add DEBUG_PRINTF, rename error_util.h -> debug_print.h

David Bremner david at tethera.net
Mon Sep 3 04:54:00 PDT 2018


Tomi Ollila <tomi.ollila at iki.fi> writes:
> To me, YAGNI says that we could drop the whole _debug_printf() and
> have 
> #include <stdio.h>
> #define DEBUG_PRINTF(format, ...) fprintf(stderr, format " (%s).\n", \
>                                           ##__VA_ARGS__, __location__)
>
> (but if there is need, then perhaps the lib code inside #ifdef DEBUG_PRINT
> ... hmm, but, outside of this context, would this also move
> _internal_error() to debug_print ;O )?

I guess that version could just go in notmuch-private.h, since it isn't
(currently) used in the CLI.

Or even directly in thread.cc, since that's the only place it's used
currently.

d


More information about the notmuch mailing list