summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Huuhko <kai.huuhko@gmail.com>2014-05-16 15:00:55 +0300
committerKai Huuhko <kai.huuhko@gmail.com>2014-05-16 15:00:55 +0300
commitf54ffc762161b712252b6a0f3a59f92fb01b551b (patch)
tree6f0bb3e4d21f42e705cbda7e477d0a013affb25c
parenta605fdfe8b817432ed486800954a59bcae7525c2 (diff)
ecore.x: Fix unicode handling
-rw-r--r--efl/ecore/x.pyx5
1 files changed, 2 insertions, 3 deletions
diff --git a/efl/ecore/x.pyx b/efl/ecore/x.pyx
index d75c587..c0e6f74 100644
--- a/efl/ecore/x.pyx
+++ b/efl/ecore/x.pyx
@@ -16,8 +16,7 @@
16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>. 16# along with this Python-EFL. If not, see <http://www.gnu.org/licenses/>.
17 17
18#from cpython cimport PyObject, Py_INCREF, Py_DECREF 18#from cpython cimport PyObject, Py_INCREF, Py_DECREF
19from cpython cimport PyMem_Malloc, PyMem_Free 19from cpython cimport PyMem_Malloc, PyMem_Free, PyUnicode_AsUTF8String
20from libc.string cimport PyUnicode_AsUTF8String
21 20
22 21
23def init(name=None): 22def init(name=None):
@@ -28,7 +27,7 @@ def init(name=None):
28 """ 27 """
29 cdef int i 28 cdef int i
30 if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name) 29 if isinstance(name, unicode): name = PyUnicode_AsUTF8String(name)
31 i = ecore_x_init(s if name is not None else NULL) 30 i = ecore_x_init(<char *>name if name is not None else NULL)
32 x_events_register() 31 x_events_register()
33 return i 32 return i
34 33