diff options
author | Peng Wu <alexepico@gmail.com> | 2016-07-21 13:16:05 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-07-21 13:16:05 +0800 |
commit | 7f05038b522db86e966be4bd0c34c4c5c4dd266f (patch) | |
tree | 141e8bdf23cecee46ba33054233649f855f9e25d /src | |
parent | 5b5e43db425969d28082e904947b5eb5b5039c31 (diff) | |
download | ibus-libpinyin-7f05038b522db86e966be4bd0c34c4c5c4dd266f.tar.gz ibus-libpinyin-7f05038b522db86e966be4bd0c34c4c5c4dd266f.tar.xz ibus-libpinyin-7f05038b522db86e966be4bd0c34c4c5c4dd266f.zip |
add assert checks
Diffstat (limited to 'src')
-rw-r--r-- | src/PYLibPinyin.cc | 2 | ||||
-rw-r--r-- | src/PYPBopomofoEditor.cc | 2 | ||||
-rw-r--r-- | src/PYPPinyinEditor.cc | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/PYLibPinyin.cc b/src/PYLibPinyin.cc index 179a454..467b2ab 100644 --- a/src/PYLibPinyin.cc +++ b/src/PYLibPinyin.cc @@ -315,7 +315,7 @@ LibPinyinBackEnd::rememberUserInput (pinyin_instance_t * instance) remember user input. */ gchar * sentence = NULL; pinyin_get_sentence (instance, &sentence); - pinyin_remember_user_input (instance, sentence, -1); + assert (pinyin_remember_user_input (instance, sentence, -1)); g_free (sentence); /* save later, will mark modified from pinyin/bopomofo editor. */ diff --git a/src/PYPBopomofoEditor.cc b/src/PYPBopomofoEditor.cc index 8d49614..a18e9ef 100644 --- a/src/PYPBopomofoEditor.cc +++ b/src/PYPBopomofoEditor.cc @@ -330,7 +330,7 @@ BopomofoEditor::updatePreeditText () size_t offset = 0; guint cursor = getPinyinCursor (); - pinyin_get_character_offset(m_instance, sentence, cursor, &offset); + assert (pinyin_get_character_offset(m_instance, sentence, cursor, &offset)); Editor::updatePreeditText (preedit_text, offset, TRUE); if (sentence) diff --git a/src/PYPPinyinEditor.cc b/src/PYPPinyinEditor.cc index b7ab8c3..8e0ddc6 100644 --- a/src/PYPPinyinEditor.cc +++ b/src/PYPPinyinEditor.cc @@ -266,7 +266,7 @@ PinyinEditor::updatePreeditText () size_t offset = 0; guint cursor = getPinyinCursor (); - pinyin_get_character_offset(m_instance, sentence, cursor, &offset); + assert (pinyin_get_character_offset(m_instance, sentence, cursor, &offset)); Editor::updatePreeditText (preedit_text, offset, TRUE); if (sentence) |