davemds pushed a commit to branch master.

http://git.enlightenment.org/bindings/python/python-efl.git/commit/?id=b04147b5f3772f1526e6ffcddbfde71252ec4917

commit b04147b5f3772f1526e6ffcddbfde71252ec4917
Author: davemds <[email protected]>
Date:   Thu Feb 27 22:48:22 2014 +0100

    Python-EFL: whoops, fix last commit to work with py3
---
 efl/elementary/multibuttonentry.pyx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/efl/elementary/multibuttonentry.pyx 
b/efl/elementary/multibuttonentry.pyx
index 6e37d71..591f885 100644
--- a/efl/elementary/multibuttonentry.pyx
+++ b/efl/elementary/multibuttonentry.pyx
@@ -96,12 +96,14 @@ cdef char * _multibuttonentry_format_cb(int count, void 
*data) with gil:
     (callback, a, ka) = <object>data
 
     try:
-        ret = callback(count, *a, **ka)
+        s = callback(count, *a, **ka)
+        if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s)
     except:
         traceback.print_exc()
+        return NULL
 
     # TODO leak here
-    return strdup(ret)
+    return strdup(<char *>s)
 
 
 cdef class MultiButtonEntryItem(ObjectItem):

-- 


Reply via email to