summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Andreoli <dave@gurumeditation.it>2018-08-17 10:46:00 +0200
committerDave Andreoli <dave@gurumeditation.it>2018-08-17 10:46:00 +0200
commit2991a6683efd743d024f4afaf8c5ad6db018a758 (patch)
treed782f4ebcbf7f8a366fba9ceaa0467ee0abd38e6
parentfb9b06931e06278c1d63e562c72cc79e9a8fa2a6 (diff)
Fix elm.Image.file.__get__
This is to hide a behaviour changes in elm, quite a corner case, but spotted by our tests. If you do a file_get before a file_set, elm is nomore nullifying the pointers, thus we try to ctouni our garbage. Just initialize well our vars
-rw-r--r--efl/elementary/image.pxi8
1 files changed, 4 insertions, 4 deletions
diff --git a/efl/elementary/image.pxi b/efl/elementary/image.pxi
index 0e75ae0..d03e982 100644
--- a/efl/elementary/image.pxi
+++ b/efl/elementary/image.pxi
@@ -125,8 +125,8 @@ cdef class Image(Object):
125 125
126 def __get__(self): 126 def __get__(self):
127 cdef: 127 cdef:
128 const char *filename 128 const char *filename = NULL
129 const char *group 129 const char *group = NULL
130 130
131 elm_image_file_get(self.obj, &filename, &group) 131 elm_image_file_get(self.obj, &filename, &group)
132 return (_ctouni(filename), _ctouni(group)) 132 return (_ctouni(filename), _ctouni(group))
@@ -140,8 +140,8 @@ cdef class Image(Object):
140 raise RuntimeError("Could not set file.") 140 raise RuntimeError("Could not set file.")
141 def file_get(self): 141 def file_get(self):
142 cdef: 142 cdef:
143 const char *filename 143 const char *filename = NULL
144 const char *group 144 const char *group = NULL
145 145
146 elm_image_file_get(self.obj, &filename, &group) 146 elm_image_file_get(self.obj, &filename, &group)
147 return (_ctouni(filename), _ctouni(group)) 147 return (_ctouni(filename), _ctouni(group))