mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 03:50:06 +01:00
Fix conversion of variant list members
Item() returns either a Node* or (with wxUSE_STL=1) a compatibility_iterator. While the former is silently and erroneously converted to a Variant using the Variant(void*) overload, the STL flavor fortunately failed. Dereference the Node*/iterator before passing it to wxVariant_out_helper(const Variant&).
This commit is contained in:
@@ -182,7 +182,7 @@ PyObject* wxPGVariant_out_helper(const wxVariant& value)
|
||||
size_t idx = 0;
|
||||
PyObject* value = PyList_New(0);
|
||||
for (idx=0; idx < sipCpp->GetCount(); idx++) {
|
||||
PyObject* item = wxPGVariant_out_helper(sipCpp->Item(idx));
|
||||
PyObject* item = wxPGVariant_out_helper(sipCpp->Item(idx)->GetData());
|
||||
PyList_Append(value, item);
|
||||
}
|
||||
return value;
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
size_t idx = 0;
|
||||
PyObject* value = PyList_New(0);
|
||||
for (idx=0; idx < sipCpp->GetCount(); idx++) {
|
||||
PyObject* item = wxVariant_out_helper(sipCpp->Item(idx));
|
||||
PyObject* item = wxVariant_out_helper(sipCpp->Item(idx)->GetData());
|
||||
PyList_Append(value, item);
|
||||
}
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user