Skip to content

Commit f84f92c

Browse files
committed
Fixes for wx.ListBox
1 parent 430a6c2 commit f84f92c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

etg/cffi/arrays.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def run():
125125
c2py="""\
126126
ret = []
127127
array = ffi.cast('int*', cdata.array)
128-
for i in range(cdata):
128+
for i in range(cdata.length):
129129
ret.append(array[i])
130130
131131
clib.free(cdata.array)

etg/cffi/clntdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def run():
2828
name='wxClientData', cType='void*',
2929
py2c="""\
3030
with wrapper_lib.get_refcounted_handle(py_obj) as handle:
31-
return (clib.new_wxPyClientData(handle), None)
31+
return clib.new_wxPyClientData(handle)
3232
""",
3333
c2cpp="return (wxPyClientData*)cdata;",
3434
cpp2c="return ((wxPyClientData*)cpp_obj)->get_handle();",

etg/listbox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def run():
4444
set.ignore()
4545

4646
c.find('GetSelections').type = 'wxArrayInt*'
47-
c.find('GetSelections').factory = True # a new instance is being created
47+
c.find('GetSelections').factory = False # We return a list
4848
c.find('GetSelections.selections').ignore()
4949
c.find('GetSelections').setCppCode("""\
5050
wxArrayInt* array = new wxArrayInt;

0 commit comments

Comments
 (0)