TRACE_APPLY_ARG_INIT
-typedef bool (*match_func_t) (hb_codepoint_t glyph_id, const USHORT &value, char *data);
+typedef bool (*match_func_t) (hb_codepoint_t glyph_id, const USHORT &value, const char *data);
typedef bool (*apply_lookup_func_t) (APPLY_ARG_DEF, unsigned int lookup_index);
struct ContextFuncs
};
-static inline bool match_glyph (hb_codepoint_t glyph_id, const USHORT &value, char *data HB_GNUC_UNUSED)
+static inline bool match_glyph (hb_codepoint_t glyph_id, const USHORT &value, const char *data HB_GNUC_UNUSED)
{
return glyph_id == value;
}
-static inline bool match_class (hb_codepoint_t glyph_id, const USHORT &value, char *data)
+static inline bool match_class (hb_codepoint_t glyph_id, const USHORT &value, const char *data)
{
const ClassDef &class_def = *reinterpret_cast<const ClassDef *>(data);
return class_def.get_class (glyph_id) == value;
}
-static inline bool match_coverage (hb_codepoint_t glyph_id, const USHORT &value, char *data)
+static inline bool match_coverage (hb_codepoint_t glyph_id, const USHORT &value, const char *data)
{
const OffsetTo<Coverage> &coverage = (const OffsetTo<Coverage>&)value;
return (data+coverage) (glyph_id) != NOT_COVERED;
unsigned int count, /* Including the first glyph (not matched) */
const USHORT input[], /* Array of input values--start with second glyph */
match_func_t match_func,
- char *match_data,
+ const char *match_data,
unsigned int *context_length_out)
{
unsigned int i, j;
unsigned int count,
const USHORT backtrack[],
match_func_t match_func,
- char *match_data)
+ const char *match_data)
{
if (HB_UNLIKELY (buffer->out_pos < count))
return false;
unsigned int count,
const USHORT lookahead[],
match_func_t match_func,
- char *match_data,
+ const char *match_data,
unsigned int offset)
{
unsigned int i, j;
struct ContextLookupContext
{
ContextFuncs funcs;
- char *match_data;
+ const char *match_data;
};
static inline bool context_lookup (APPLY_ARG_DEF,
*/
struct ContextLookupContext lookup_context = {
{match_class, apply_func},
- DECONST_CHARP(&class_def)
+ CONST_CHARP(&class_def)
};
return rule_set.apply (APPLY_ARG, lookup_context);
}
const LookupRecord *lookupRecord = &CONST_CAST(LookupRecord, coverage, coverage[0].get_size () * glyphCount);
struct ContextLookupContext lookup_context = {
{match_coverage, apply_func},
- DECONST_CHARP(this)
+ CONST_CHARP(this)
};
return context_lookup (APPLY_ARG,
glyphCount, (const USHORT *) (coverage + 1),
struct ChainContextLookupContext
{
ContextFuncs funcs;
- char *match_data[3];
+ const char *match_data[3];
};
static inline bool chain_context_lookup (APPLY_ARG_DEF,
*/
struct ChainContextLookupContext lookup_context = {
{match_class, apply_func},
- {DECONST_CHARP(&backtrack_class_def),
- DECONST_CHARP(&input_class_def),
- DECONST_CHARP(&lookahead_class_def)}
+ {CONST_CHARP(&backtrack_class_def),
+ CONST_CHARP(&input_class_def),
+ CONST_CHARP(&lookahead_class_def)}
};
return rule_set.apply (APPLY_ARG, lookup_context);
}
const ArrayOf<LookupRecord> &lookup = CONST_NEXT (ArrayOf<LookupRecord>, lookahead);
struct ChainContextLookupContext lookup_context = {
{match_coverage, apply_func},
- {DECONST_CHARP(this), DECONST_CHARP(this), DECONST_CHARP(this)}
+ {CONST_CHARP(this), CONST_CHARP(this), CONST_CHARP(this)}
};
return chain_context_lookup (APPLY_ARG,
backtrack.len, (const USHORT *) backtrack.const_array(),