Register buffer vars in Indic shaper
authorBehdad Esfahbod <behdad@behdad.org>
Thu, 28 Jul 2011 21:06:46 +0000 (17:06 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Thu, 28 Jul 2011 21:07:50 +0000 (17:07 -0400)
src/hb-ot-shape-complex-indic.cc
src/hb-ot-shape.cc

index 494368c..e14b894 100644 (file)
@@ -287,6 +287,9 @@ final_reordering (const hb_ot_map_t *map,
                  hb_buffer_t *buffer,
                  void *user_data HB_UNUSED)
 {
+
+  HB_BUFFER_DEALLOCATE_VAR (buffer, indic_category);
+  HB_BUFFER_DEALLOCATE_VAR (buffer, indic_position);
 }
 
 void
@@ -331,6 +334,9 @@ _hb_ot_shape_complex_setup_masks_indic (hb_ot_map_t *map, hb_buffer_t *buffer)
 {
   unsigned int count = buffer->len;
 
+  HB_BUFFER_ALLOCATE_VAR (buffer, indic_category);
+  HB_BUFFER_ALLOCATE_VAR (buffer, indic_position);
+
   for (unsigned int i = 0; i < count; i++)
   {
     unsigned int type = get_indic_categories (buffer->info[i].codepoint);
index 1577214..e40cf1e 100644 (file)
@@ -396,6 +396,8 @@ hb_ot_shape_execute_internal (hb_ot_shape_context_t *c)
   HB_BUFFER_DEALLOCATE_VAR (c->buffer, general_category);
 
   c->buffer->props.direction = c->target_direction;
+
+  c->buffer->deallocate_var_all ();
 }
 
 static void