summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-12-05 11:01:27 +0800
committerPeng Wu <alexepico@gmail.com>2012-12-05 11:01:27 +0800
commit2e0f37b400572b6ed9938229802efd47902f7985 (patch)
tree36184693bf95535c3ec75ae92832ce7701e401f8 /src
parentb79f409d67678275488bf803467dd48b00518309 (diff)
downloadlibpinyin-2e0f37b400572b6ed9938229802efd47902f7985.tar.gz
libpinyin-2e0f37b400572b6ed9938229802efd47902f7985.tar.xz
libpinyin-2e0f37b400572b6ed9938229802efd47902f7985.zip
remove pinyin_clear_constraint*
Diffstat (limited to 'src')
-rw-r--r--src/libpinyin.ver2
-rw-r--r--src/pinyin.cpp23
-rw-r--r--src/pinyin.h22
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.