unsigned int len; /* Length of ->info and ->pos arrays */
unsigned int out_len; /* Length of ->out array if have_output */
- unsigned int serial;
-
unsigned int allocated; /* Length of allocated arrays */
hb_glyph_info_t *info;
hb_glyph_info_t *out_info;
hb_glyph_position_t *pos;
+ unsigned int serial;
+ uint8_t allocated_var_bytes[8];
+ const char *allocated_var_owner[8];
+
/* Methods */
{ return have_output? out_len : idx; }
inline unsigned int next_serial (void) { return serial++; }
+ HB_INTERNAL void allocate_var (unsigned int byte_i, unsigned int count, const char *owner);
+ HB_INTERNAL void deallocate_var (unsigned int byte_i, unsigned int count, const char *owner);
+ HB_INTERNAL void deallocate_var_all (void);
+
HB_INTERNAL void add (hb_codepoint_t codepoint,
hb_mask_t mask,
unsigned int cluster);
};
+#define HB_BUFFER_XALLOCATE_VAR(b, func, var, owner) \
+ b->func (offsetof (hb_glyph_info_t, var) - offsetof(hb_glyph_info_t, var1), \
+ sizeof (b->info[0].var), owner)
+#define HB_BUFFER_ALLOCATE_VAR(b, var) \
+ HB_BUFFER_XALLOCATE_VAR (b, allocate_var, var (), #var)
+#define HB_BUFFER_DEALLOCATE_VAR(b, var) \
+ HB_BUFFER_XALLOCATE_VAR (b, deallocate_var, var (), #var)
+
+
HB_END_DECLS
#endif /* HB_BUFFER_PRIVATE_HH */