davemds pushed a commit to branch master.
commit 2f563ce6ec15104d7fd85aba54d56e144f549432
Author: davemds <[email protected]>
Date: Tue Apr 2 13:48:43 2013 +0200
Python-EFL: the return string from edje_file_data_get() must be free() by
the caller.
---
efl/edje/efl.edje.pyx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/efl/edje/efl.edje.pyx b/efl/edje/efl.edje.pyx
index cdd3ac1..cd3af33 100644
--- a/efl/edje/efl.edje.pyx
+++ b/efl/edje/efl.edje.pyx
@@ -179,11 +179,15 @@ def file_group_exists(file, group):
def file_data_get(file, key):
+ cdef char *s
if isinstance(file, unicode): file = file.encode("UTF-8")
if isinstance(key, unicode): key = key.encode("UTF-8")
- return _ctouni(edje_file_data_get(
+ s = edje_file_data_get(
<const_char *>file if file is not None else NULL,
- <const_char *>key if key is not None else NULL))
+ <const_char *>key if key is not None else NULL)
+ ret = _touni(s)
+ libc.stdlib.free(s)
+ return ret
def file_cache_set(int count):
--
------------------------------------------------------------------------------
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