diff options
-rw-r--r-- | src/libpinyin.ver | 2 | ||||
-rw-r--r-- | src/pinyin.cpp | 23 | ||||
-rw-r--r-- | src/pinyin.h | 22 |
3 files changed, 0 insertions, 47 deletions
diff --git a/src/libpinyin.ver b/src/libpinyin.ver index 19a4c5d..cde942a 100644 --- a/src/libpinyin.ver +++ b/src/libpinyin.ver @@ -29,8 +29,6 @@ LIBPINYIN { pinyin_get_full_pinyin_candidates; pinyin_choose_candidate; pinyin_free_candidates; - pinyin_clear_constraint; - pinyin_clear_constraints; pinyin_lookup_tokens; pinyin_translate_token; pinyin_get_pinyins_from_token; diff --git a/src/pinyin.cpp b/src/pinyin.cpp index 8bb7a8b..13377ad 100644 --- a/src/pinyin.cpp +++ b/src/pinyin.cpp @@ -1691,29 +1691,6 @@ bool pinyin_free_candidates(pinyin_instance_t * instance, return true; } - -bool pinyin_clear_constraint(pinyin_instance_t * instance, - size_t offset){ - pinyin_context_t * & context = instance->m_context; - - bool retval = context->m_pinyin_lookup->clear_constraint - (instance->m_constraints, offset); - - return retval; -} - -bool pinyin_clear_constraints(pinyin_instance_t * instance){ - pinyin_context_t * & context = instance->m_context; - bool retval = true; - - for ( size_t i = 0; i < instance->m_constraints->len; ++i ) { - retval = context->m_pinyin_lookup->clear_constraint - (instance->m_constraints, i) && retval; - } - - return retval; -} - bool pinyin_lookup_tokens(pinyin_instance_t * instance, const char * phrase, GArray * tokenarray){ pinyin_context_t * & context = instance->m_context; diff --git a/src/pinyin.h b/src/pinyin.h index 7113704..136848e 100644 --- a/src/pinyin.h +++ b/src/pinyin.h @@ -431,28 +431,6 @@ bool pinyin_free_candidates(pinyin_instance_t * instance, CandidateVector candidates); /** - * pinyin_clear_constraint: - * @instance: the pinyin instance. - * @offset: the offset in the pinyin keys. - * @returns: whether the constraint is cleared. - * - * Clear the previous chosen candidate. - * - */ -bool pinyin_clear_constraint(pinyin_instance_t * instance, - size_t offset); - -/** - * pinyin_clear_constraints: - * @instance: the pinyin instance. - * @returns: whether the constraints are cleared. - * - * Clear all constraints. - * - */ -bool pinyin_clear_constraints(pinyin_instance_t * instance); - -/** * pinyin_lookup_tokens: * @instance: the pinyin instance. * @phrase: the phrase to be looked up. |