[buffer] Minor; improve HB_NO_BUFFER_MESSAGE

This commit is contained in:
Behdad Esfahbod 2019-10-09 11:00:09 +07:00
parent 9a68e6b901
commit 029775bcbd
2 changed files with 3 additions and 1 deletions

View File

@ -776,8 +776,10 @@ hb_buffer_destroy (hb_buffer_t *buffer)
free (buffer->info); free (buffer->info);
free (buffer->pos); free (buffer->pos);
#ifndef HB_NO_BUFFER_MESSAGE
if (buffer->message_destroy) if (buffer->message_destroy)
buffer->message_destroy (buffer->message_data); buffer->message_destroy (buffer->message_data);
#endif
free (buffer); free (buffer);
} }

View File

@ -126,9 +126,9 @@ struct hb_buffer_t
/* Debugging API */ /* Debugging API */
#ifndef HB_NO_BUFFER_MESSAGE #ifndef HB_NO_BUFFER_MESSAGE
hb_buffer_message_func_t message_func; hb_buffer_message_func_t message_func;
#endif
void *message_data; void *message_data;
hb_destroy_func_t message_destroy; hb_destroy_func_t message_destroy;
#endif
/* Internal debugging. */ /* Internal debugging. */
/* The bits here reflect current allocations of the bytes in glyph_info_t's var1 and var2. */ /* The bits here reflect current allocations of the bytes in glyph_info_t's var1 and var2. */