raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b25df71d57a0e8426518137f42047d248f13322a

commit b25df71d57a0e8426518137f42047d248f13322a
Author: Ryuan Choi <[email protected]>
Date:   Sun Dec 29 13:33:19 2013 +0900

    textblock: Simple refactoring for _markup_get_text_utf8_append to call 
eina_unicode_utf8_next_get directly
    
    Summary:
    evas_string_char_next_get is simple wrapper of eina_unicode_utf8_next_get 
with
    some check routines.
    But in _markup_get_text_utf8_append, these check routines look unnecessary.
    
    Reviewers: cedric, seoz, raster
    
    Reviewed By: raster
    
    CC: cedric
    
    Differential Revision: https://phab.enlightenment.org/D420
---
 src/lib/evas/canvas/evas_object_textblock.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 992c42b..00755b3 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -6335,7 +6335,7 @@ _markup_get_text_utf8_append(Eina_Strbuf *sbuf, const 
char *text)
    for (;;)
      {
         pos = pos2;
-        pos2 = evas_string_char_next_get(text, pos2, &ch);
+        ch = eina_unicode_utf8_next_get(text, &pos2);
         if ((ch <= 0) || (pos2 <= 0)) break;
 
         if (ch == _NEWLINE)
@@ -6371,6 +6371,8 @@ _markup_get_text_append(Eina_Strbuf *txt, const 
Eina_Unicode *text)
 {
    char *base = eina_unicode_unicode_to_utf8(text, NULL);
 
+   if (!base) return;
+
    _markup_get_text_utf8_append(txt, base);
 
    free(base);

-- 


Reply via email to