[HarfBuzz] Questionable use of DEBUG

Behdad Esfahbod behdad at behdad.org
Tue Apr 30 07:32:10 PDT 2013


Ok, so this doesn't have anything to do with "release" build vs debug build.

On 13-04-30 03:10 AM, John Emmas wrote:

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

Such accidents don't happen in HarfBuzz.  We're not a C++ library.  Our public
headers and other API / ABI are watched and designed extremely carefully.


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.


-- 
behdad
http://behdad.org/



More information about the HarfBuzz mailing list