remove pinyin_clear_constraint*
authorPeng Wu <alexepico@gmail.com>
Wed, 5 Dec 2012 03:01:27 +0000 (11:01 +0800)
committerPeng Wu <alexepico@gmail.com>
Wed, 5 Dec 2012 03:01:27 +0000 (11:01 +0800)
src/libpinyin.ver
src/pinyin.cpp
src/pinyin.h

index 19a4c5d..cde942a 100644 (file)
@@ -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;
index 8bb7a8b..13377ad 100644 (file)
@@ -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;
index 7113704..136848e 100644 (file)
@@ -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.