ChewingKeyVector & pinyin_keys = instance->m_pinyin_keys;
ChewingKeyRestVector & pinyin_key_rests = instance->m_pinyin_key_rests;
+ assert(pinyin_keys->len == pinyin_key_rests->len);
+ gint num_keys = pinyin_keys->len;
+ assert(offset < num_keys);
+
/* handle "^xian$" -> "xi'an" here */
ChewingKey * key = &g_array_index(pinyin_keys, ChewingKey, offset);
ChewingKeyRest * rest = &g_array_index(pinyin_key_rests,
}
item = context->m_full_pinyin_parser->retrieve_divided_item
- (options, offset, pinyin_keys, pinyin_key_rests,
- instance->m_raw_full_pinyin,
+ (options, key, rest, instance->m_raw_full_pinyin,
strlen(instance->m_raw_full_pinyin));
if (item) {
}
const divided_table_item_t * FullPinyinParser2::retrieve_divided_item
-(pinyin_option_t options, size_t offset,
- ChewingKeyVector & keys, ChewingKeyRestVector & key_rests,
+(pinyin_option_t options, ChewingKey * key, ChewingKeyRest * rest,
const char * str, int len) const {
- assert(keys->len == key_rests->len);
-
- gint num_keys = keys->len;
- assert(offset < num_keys);
-
- ChewingKey * key = &g_array_index(keys, ChewingKey, offset);
- ChewingKeyRest * rest = &g_array_index(key_rests,
- ChewingKeyRest, offset);
guint16 tone = CHEWING_ZERO_TONE;
/* lookup divided table */
public:
const divided_table_item_t * retrieve_divided_item
- (pinyin_option_t options, size_t offset,
- ChewingKeyVector & keys, ChewingKeyRestVector & key_rests,
+ (pinyin_option_t options, ChewingKey * key, ChewingKeyRest * rest,
const char * str, int len) const;
public:
FullPinyinParser2();