[API] Add hb_buffer_allocation_successful()
Returns the error status of the buffer.
This commit is contained in:
parent
02a534b23f
commit
aab0de50e2
|
@ -260,6 +260,12 @@ hb_buffer_pre_allocate (hb_buffer_t *buffer, unsigned int size)
|
|||
return _hb_buffer_ensure (buffer, size);
|
||||
}
|
||||
|
||||
hb_bool_t
|
||||
hb_buffer_allocation_successful (hb_buffer_t *buffer)
|
||||
{
|
||||
return !buffer->in_error;
|
||||
}
|
||||
|
||||
void
|
||||
hb_buffer_add_glyph (hb_buffer_t *buffer,
|
||||
hb_codepoint_t codepoint,
|
||||
|
|
|
@ -106,10 +106,16 @@ hb_buffer_get_language (hb_buffer_t *buffer);
|
|||
void
|
||||
hb_buffer_reset (hb_buffer_t *buffer);
|
||||
|
||||
/* Returns FALSE if allocation failed */
|
||||
hb_bool_t
|
||||
hb_buffer_pre_allocate (hb_buffer_t *buffer,
|
||||
unsigned int size);
|
||||
|
||||
|
||||
/* Returns FALSE if allocation has failed before */
|
||||
hb_bool_t
|
||||
hb_buffer_allocation_successful (hb_buffer_t *buffer);
|
||||
|
||||
void
|
||||
hb_buffer_reverse (hb_buffer_t *buffer);
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ main (int argc, char **argv)
|
|||
|
||||
/* XXX test invalid UTF-8 / UTF-16 text input (also overlong sequences) */
|
||||
/* XXX test reverse() and reverse_clusters() */
|
||||
/* XXX test ensure() and memory management */
|
||||
/* XXX test pre_allocate(), allocation_successful(), and memory management */
|
||||
/* XXX test buffer reset */
|
||||
/* XXX test buffer set length */
|
||||
|
||||
|
|
Loading…
Reference in New Issue