[HarfBuzz] Questionable use of DEBUG

Behdad Esfahbod behdad at behdad.org
Tue Apr 30 08:29:26 PDT 2013


On 13-04-30 11:00 AM, Jonathan Kew wrote:
> On 30/4/13 15:32, Behdad Esfahbod wrote:
> 
>> On 13-04-30 03:35 AM, Konstantin Ritt wrote:
>>> True. But in case Harfbuzz gets compiled-in, DEBUG might be defined outside
>>> of hb-private.hh, leading to HB build failure.
>>
>> HarfBuzz build won't fail in that case.  The macro is redefined properly.
>>
>>
>> I may go ahead and rename it, but neither of the above reasons are really
>> valid.
> 
> FWIW, we ran into this a while ago in the mozilla build, and I worked around
> it by ensuring that the harfbuzz directory in our tree is compiled with
> -UDEBUG, even when we're using -DDEBUG globally; see
> http://mxr.mozilla.org/mozilla-central/source/gfx/harfbuzz/src/Makefile.in#77.
> 
> Not sure if things have changed significantly since then. But personally, I'd
> be in favor of renaming to HB_DEBUG, just because DEBUG is such a
> widely-known/used symbol (and is not normally used in quite this way).

Ah Ok.  I'll rename it to something else (HB_DEBUG is taken).

-- 
behdad
http://behdad.org/



More information about the HarfBuzz mailing list