Returns the error status of the buffer.
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,
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);
/* 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 */