Python-EFL: whoops, fix last commit to work with py3
This commit is contained in:
parent
32448918f6
commit
b04147b5f3
|
@ -96,12 +96,14 @@ cdef char * _multibuttonentry_format_cb(int count, void *data) with gil:
|
||||||
(callback, a, ka) = <object>data
|
(callback, a, ka) = <object>data
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ret = callback(count, *a, **ka)
|
s = callback(count, *a, **ka)
|
||||||
|
if isinstance(s, unicode): s = PyUnicode_AsUTF8String(s)
|
||||||
except:
|
except:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
return NULL
|
||||||
|
|
||||||
# TODO leak here
|
# TODO leak here
|
||||||
return strdup(ret)
|
return strdup(<char *>s)
|
||||||
|
|
||||||
|
|
||||||
cdef class MultiButtonEntryItem(ObjectItem):
|
cdef class MultiButtonEntryItem(ObjectItem):
|
||||||
|
|
Loading…
Reference in New Issue