Cleanup up the demo a bit
Added wxWave Added another patch for SWIG that optimizes the generated code some and eliminates some unused type mappings in the type registry. (Reduces it by about half!) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -179,28 +179,31 @@ output values.
|
||||
%}
|
||||
#endif
|
||||
|
||||
|
||||
// I don't use this anywhere, get rid of it...
|
||||
|
||||
// Helper function for List output
|
||||
// static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
// PyObject* o2;
|
||||
// if (!target) {
|
||||
// target = o;
|
||||
// } else if (target == Py_None) {
|
||||
// Py_DECREF(Py_None);
|
||||
// target = o;
|
||||
// } else {
|
||||
// if (!PyList_Check(target)) {
|
||||
// o2 = target;
|
||||
// target = PyList_New(0);
|
||||
// PyList_Append(target, o2);
|
||||
// Py_XDECREF(o2);
|
||||
// }
|
||||
// PyList_Append(target,o);
|
||||
// Py_XDECREF(o);
|
||||
// }
|
||||
// return target;
|
||||
// }
|
||||
|
||||
%{
|
||||
static PyObject* l_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
if (!PyList_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyList_New(0);
|
||||
PyList_Append(target, o2);
|
||||
Py_XDECREF(o2);
|
||||
}
|
||||
PyList_Append(target,o);
|
||||
Py_XDECREF(o);
|
||||
}
|
||||
return target;
|
||||
}
|
||||
%}
|
||||
|
||||
// Force the argument to be ignored.
|
||||
|
Reference in New Issue
Block a user