[API] Remove hb_buffer_clear()

One should use hb_buffer_reset() really.
This commit is contained in:
Behdad Esfahbod 2011-04-15 18:35:08 -04:00
parent 7f5bdc8054
commit 2fc56edff6
3 changed files with 5 additions and 19 deletions

View File

@ -230,17 +230,6 @@ hb_buffer_get_language (hb_buffer_t *buffer)
void void
hb_buffer_reset (hb_buffer_t *buffer) hb_buffer_reset (hb_buffer_t *buffer)
{
hb_buffer_clear (buffer);
buffer->props = _hb_buffer_nil.props;
hb_unicode_funcs_destroy (buffer->unicode);
buffer->unicode = _hb_buffer_nil.unicode;
}
void
hb_buffer_clear (hb_buffer_t *buffer)
{ {
buffer->have_output = FALSE; buffer->have_output = FALSE;
buffer->have_positions = FALSE; buffer->have_positions = FALSE;
@ -250,6 +239,11 @@ hb_buffer_clear (hb_buffer_t *buffer)
buffer->i = 0; buffer->i = 0;
buffer->out_info = buffer->info; buffer->out_info = buffer->info;
buffer->serial = 0; buffer->serial = 0;
buffer->props = _hb_buffer_nil.props;
hb_unicode_funcs_destroy (buffer->unicode);
buffer->unicode = _hb_buffer_nil.unicode;
} }
hb_bool_t hb_bool_t

View File

@ -102,10 +102,6 @@ hb_buffer_get_language (hb_buffer_t *buffer);
void void
hb_buffer_reset (hb_buffer_t *buffer); hb_buffer_reset (hb_buffer_t *buffer);
/* Clears buffer glyphs, but doesn't touch other buffer attributes. */
void
hb_buffer_clear (hb_buffer_t *buffer);
void void
hb_buffer_clear_positions (hb_buffer_t *buffer); hb_buffer_clear_positions (hb_buffer_t *buffer);

View File

@ -146,10 +146,6 @@ test_buffer_contents (Fixture *fixture, gconstpointer user_data)
g_assert_cmphex (glyphs[i].var1.u32, ==, 0); g_assert_cmphex (glyphs[i].var1.u32, ==, 0);
g_assert_cmphex (glyphs[i].var2.u32, ==, 0); g_assert_cmphex (glyphs[i].var2.u32, ==, 0);
} }
hb_buffer_clear (fixture->b);
/* XXX Make sure clear() doesn't unset other properties? */
g_assert_cmpint (hb_buffer_get_length (fixture->b), ==, 0);
} }
static void static void