Add internal hb_buffer_t::get_scratch_buffer()

This commit is contained in:
Behdad Esfahbod 2011-08-03 17:38:54 -04:00
parent 71e7936fca
commit e62df43649
2 changed files with 12 additions and 0 deletions

View File

@ -135,6 +135,8 @@ struct _hb_buffer_t {
{ return likely (size <= allocated) ? TRUE : enlarge (size); }
HB_INTERNAL bool make_room_for (unsigned int num_in, unsigned int num_out);
HB_INTERNAL void *get_scratch_buffer (unsigned int *size);
};

View File

@ -135,6 +135,16 @@ hb_buffer_t::make_room_for (unsigned int num_in,
return TRUE;
}
void *
hb_buffer_t::get_scratch_buffer (unsigned int *size)
{
have_output = FALSE;
have_positions = FALSE;
out_len = 0;
*size = allocated * sizeof (pos[0]);
return pos;
}
/* HarfBuzz-Internal API */