[HarfBuzz] Questionable use of DEBUG

Konstantin Ritt ritt.ks at gmail.com
Tue Apr 30 00:35:51 PDT 2013


2013/4/30 John Emmas <johne53 at tiscali.co.uk>

> 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.


True. But in case Harfbuzz gets compiled-in, DEBUG might be defined outside
of hb-private.hh, leading to HB build failure.

Kind regards,
Konstantin


>
>
> John
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/harfbuzz/attachments/20130430/03971971/attachment.html>


More information about the HarfBuzz mailing list