[HarfBuzz] Questionable use of DEBUG

John Emmas johne53 at tiscali.co.uk
Tue Apr 30 00:10:45 PDT 2013


On 30/04/2013 07:41, Konstantin Ritt wrote:
> Hi Behdad,
>
> John is probably right, having DEBUG macro defined in release mode 
> could potentially lead to a hard-tracking issues. And this possibility 
> grows when we're compiling Harfbuzz in instead of linking to it.
> Maybe worth of renaming to HB_DEBUG?
>

Thanks for supporting me on this, Konstantin.

In defence of Harfbuzz I should emphasize that at present, there's 
absolutely no problem with the custom macro.  It gets defined in 
'hb-private.hh' which is never exposed through any of the public header 
files.  However, my fear is that this is the kind of thing which tends 
to get get forgotten over time.  In the future, somebody could take the 
macro out of 'hb-private.hh' and innocuously move it to some other 
header file - where it could end up causing havoc.  I totally agree with 
renaming it to HB_DEBUG.  Otherwise, there's effectively an accident 
waiting to happen.

John



More information about the HarfBuzz mailing list