From 029775bcbd0a25ee1cdb6c0653a2ce189774490a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 9 Oct 2019 11:00:09 +0700 Subject: [PATCH] [buffer] Minor; improve HB_NO_BUFFER_MESSAGE --- src/hb-buffer.cc | 2 ++ src/hb-buffer.hh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 40ac55c1c..6131c8617 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc @@ -776,8 +776,10 @@ hb_buffer_destroy (hb_buffer_t *buffer) free (buffer->info); free (buffer->pos); +#ifndef HB_NO_BUFFER_MESSAGE if (buffer->message_destroy) buffer->message_destroy (buffer->message_data); +#endif free (buffer); } diff --git a/src/hb-buffer.hh b/src/hb-buffer.hh index b8ea5ad39..b5596d945 100644 --- a/src/hb-buffer.hh +++ b/src/hb-buffer.hh @@ -126,9 +126,9 @@ struct hb_buffer_t /* Debugging API */ #ifndef HB_NO_BUFFER_MESSAGE hb_buffer_message_func_t message_func; -#endif void *message_data; hb_destroy_func_t message_destroy; +#endif /* Internal debugging. */ /* The bits here reflect current allocations of the bytes in glyph_info_t's var1 and var2. */