summaryrefslogtreecommitdiff
path: root/efl/edje/efl.edje.pyx
diff options
context:
space:
mode:
authordavemds <dave@gurumeditation.it>2013-04-02 13:48:43 +0200
committerdavemds <dave@gurumeditation.it>2013-04-02 13:50:01 +0200
commit2f563ce6ec15104d7fd85aba54d56e144f549432 (patch)
treec900df6e7d176220233fe5ec5163fee1110048d2 /efl/edje/efl.edje.pyx
parentbd1dd50bc684a9f23b1cfddfb0f9990fb79245bb (diff)
Python-EFL: the return string from edje_file_data_get() must be free() by the caller.
Diffstat (limited to '')
-rw-r--r--efl/edje/efl.edje.pyx8
1 files 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):
179 179
180 180
181def file_data_get(file, key): 181def file_data_get(file, key):
182 cdef char *s
182 if isinstance(file, unicode): file = file.encode("UTF-8") 183 if isinstance(file, unicode): file = file.encode("UTF-8")
183 if isinstance(key, unicode): key = key.encode("UTF-8") 184 if isinstance(key, unicode): key = key.encode("UTF-8")
184 return _ctouni(edje_file_data_get( 185 s = edje_file_data_get(
185 <const_char *>file if file is not None else NULL, 186 <const_char *>file if file is not None else NULL,
186 <const_char *>key if key is not None else NULL)) 187 <const_char *>key if key is not None else NULL)
188 ret = _touni(s)
189 libc.stdlib.free(s)
190 return ret
187 191
188 192
189def file_cache_set(int count): 193def file_cache_set(int count):