[config] Dont' compile buffer message API if HB_NO_BUFFER_MESSAGE
Part of https://github.com/harfbuzz/harfbuzz/issues/1652
This commit is contained in:
parent
be1c0ab218
commit
eb9798ef73
@ -1993,6 +1993,7 @@ hb_buffer_diff (hb_buffer_t *buffer,
|
|||||||
* Debugging.
|
* Debugging.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifndef HB_NO_BUFFER_MESSAGE
|
||||||
/**
|
/**
|
||||||
* hb_buffer_set_message_func:
|
* hb_buffer_set_message_func:
|
||||||
* @buffer: an #hb_buffer_t.
|
* @buffer: an #hb_buffer_t.
|
||||||
@ -2030,3 +2031,4 @@ hb_buffer_t::message_impl (hb_font_t *font, const char *fmt, va_list ap)
|
|||||||
vsnprintf (buf, sizeof (buf), fmt, ap);
|
vsnprintf (buf, sizeof (buf), fmt, ap);
|
||||||
return (bool) this->message_func (this, font, buf, this->message_data);
|
return (bool) this->message_func (this, font, buf, this->message_data);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -124,7 +124,9 @@ struct hb_buffer_t
|
|||||||
unsigned int context_len[2];
|
unsigned int context_len[2];
|
||||||
|
|
||||||
/* Debugging API */
|
/* Debugging API */
|
||||||
|
#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;
|
||||||
|
|
||||||
@ -351,8 +353,9 @@ struct hb_buffer_t
|
|||||||
{
|
{
|
||||||
#ifdef HB_NO_BUFFER_MESSAGE
|
#ifdef HB_NO_BUFFER_MESSAGE
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#else
|
||||||
return unlikely (message_func);
|
return unlikely (message_func);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
bool message (hb_font_t *font, const char *fmt, ...) HB_PRINTF_FUNC(3, 4)
|
bool message (hb_font_t *font, const char *fmt, ...) HB_PRINTF_FUNC(3, 4)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user