kuuko pushed a commit to branch master.
commit 4155c99d3e2010663818eaa83d3d7544e419ecda
Author: Kai Huuhko <[email protected]>
Date: Mon Apr 1 18:16:26 2013 +0000
Ecore: more _cfruni riddance.
---
efl/ecore/efl.ecore.pyx | 3 +--
efl/ecore/efl.ecore_exe.pxi | 3 ++-
efl/ecore/efl.ecore_file_download.pxi | 16 ++++++++++------
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/efl/ecore/efl.ecore.pyx b/efl/ecore/efl.ecore.pyx
index 7198f0b..9fc1fae 100644
--- a/efl/ecore/efl.ecore.pyx
+++ b/efl/ecore/efl.ecore.pyx
@@ -17,7 +17,6 @@
import traceback
from efl.eo cimport Eo
-from efl.eo cimport _fruni, _cfruni
from efl.eo cimport PY_REFCOUNT
from cpython cimport Py_INCREF, Py_DECREF
@@ -75,7 +74,7 @@ def init():
global _ecore_events_registered
r = ecore_init()
-
+
if r > 0 and _ecore_events_registered == 0:
_ecore_events_registered = 1
diff --git a/efl/ecore/efl.ecore_exe.pxi b/efl/ecore/efl.ecore_exe.pxi
index 54e9a12..92dc1eb 100644
--- a/efl/ecore/efl.ecore_exe.pxi
+++ b/efl/ecore/efl.ecore_exe.pxi
@@ -311,7 +311,8 @@ cdef class Exe(object):
if flags is None:
flags = 0
- self._set_obj(_fruni(exe_cmd), flags)
+ if isinstance(exe_cmd, unicode): exe_cmd = exe_cmd.encode("UTF-8")
+ self._set_obj(exe_cmd, flags)
self.__data = data
self.__callbacks = {}
diff --git a/efl/ecore/efl.ecore_file_download.pxi
b/efl/ecore/efl.ecore_file_download.pxi
index 5e1f78d..91b02dd 100644
--- a/efl/ecore/efl.ecore_file_download.pxi
+++ b/efl/ecore/efl.ecore_file_download.pxi
@@ -56,7 +56,7 @@ cdef class FileDownload(object):
the legacy API.
Instance example::
-
+
from efl.ecore import FileDownload
dl = FileDownload("http://your_url", "/path/to/destination", None,
None)
dl.abort()
@@ -88,11 +88,15 @@ cdef class FileDownload(object):
self.args = args
self.kargs = kargs
- if not ecore_file_download(_cfruni(url), _cfruni(dst),
- _completion_cb, _progress_cb,
- <void *>self, &job):
- raise SystemError("could not download '%s' to %s" % (url, dst))
-
+ if isinstance(url, unicode): url = url.encode("UTF-8")
+ if isinstance(dst, unicode): dst = dst.encode("UTF-8")
+ if not ecore_file_download(
+ <const_char *>url if url is not None else NULL,
+ <const_char *>dst if dst is not None else NULL,
+ _completion_cb, _progress_cb,
+ <void *>self, &job):
+ raise SystemError("could not download '%s' to %s" % (url, dst))
+
self.job = job
Py_INCREF(self)
--
------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2