X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0e94700456e41f5fcf041cfef8a83d0f296d2062..3bcd5e1c64a85bee7005dcb65bee98784dad1f0f:/wxPython/src/gtk/misc.cpp diff --git a/wxPython/src/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp index abefb81588..0192a4439a 100644 --- a/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/misc.cpp @@ -27,19 +27,21 @@ # define SWIGEXPORT(a) __declspec(dllexport) a # else # if defined(__BORLANDC__) -# define SWIGEXPORT(a) a _export +# define SWIGEXPORT(a) a _export # else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a # endif # endif #else -# define SWIGEXPORT(a) a +# define SWIGEXPORT(a) a #endif +#include "Python.h" + #ifdef __cplusplus extern "C" { #endif -#include "Python.h" + extern void SWIG_MakePtr(char *, void *, char *); extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *)); extern char *SWIG_GetPtr(char *, void **, char *); @@ -58,47 +60,28 @@ extern PyObject *SWIG_newvarlink(void); #include #include -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* t_output_helper(PyObject* target, PyObject* o) { PyObject* o2; PyObject* o3; - if (!target) { + if (!target) { target = o; - } else if (target == Py_None) { + } else if (target == Py_None) { Py_DECREF(Py_None); target = o; - } else { + } else { if (!PyTuple_Check(target)) { o2 = target; target = PyTuple_New(1); PyTuple_SetItem(target, 0, o2); } - o3 = PyTuple_New(1); - PyTuple_SetItem(o3, 0, o); + o3 = PyTuple_New(1); + PyTuple_SetItem(o3, 0, o); o2 = target; - target = PySequence_Concat(o2, o3); - Py_DECREF(o2); + target = PySequence_Concat(o2, o3); + Py_DECREF(o2); Py_DECREF(o3); } return target; @@ -4216,14 +4199,6 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_byte","_unsigned_char",0}, { "_long","_unsigned_long",0}, { "_long","_signed_long",0}, - { "_class_wxObject","_class_wxBusyInfo",SwigwxBusyInfoTowxObject}, - { "_class_wxObject","_wxBusyInfo",SwigwxBusyInfoTowxObject}, - { "_class_wxObject","_class_wxAcceleratorTable",SwigwxAcceleratorTableTowxObject}, - { "_class_wxObject","_wxAcceleratorTable",SwigwxAcceleratorTableTowxObject}, - { "_class_wxObject","_class_wxLayoutConstraints",SwigwxLayoutConstraintsTowxObject}, - { "_class_wxObject","_wxLayoutConstraints",SwigwxLayoutConstraintsTowxObject}, - { "_class_wxObject","_class_wxIndividualLayoutConstraint",SwigwxIndividualLayoutConstraintTowxObject}, - { "_class_wxObject","_wxIndividualLayoutConstraint",SwigwxIndividualLayoutConstraintTowxObject}, { "_size_t","_wxCoord",0}, { "_size_t","_wxPrintQuality",0}, { "_size_t","_time_t",0}, @@ -4256,13 +4231,9 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_WXTYPE","_unsigned_short",0}, { "_unsigned_short","_WXTYPE",0}, { "_unsigned_short","_short",0}, - { "_wxObject","_class_wxBusyInfo",SwigwxBusyInfoTowxObject}, { "_wxObject","_wxBusyInfo",SwigwxBusyInfoTowxObject}, - { "_wxObject","_class_wxAcceleratorTable",SwigwxAcceleratorTableTowxObject}, { "_wxObject","_wxAcceleratorTable",SwigwxAcceleratorTableTowxObject}, - { "_wxObject","_class_wxLayoutConstraints",SwigwxLayoutConstraintsTowxObject}, { "_wxObject","_wxLayoutConstraints",SwigwxLayoutConstraintsTowxObject}, - { "_wxObject","_class_wxIndividualLayoutConstraint",SwigwxIndividualLayoutConstraintTowxObject}, { "_wxObject","_wxIndividualLayoutConstraint",SwigwxIndividualLayoutConstraintTowxObject}, { "_signed_short","_WXTYPE",0}, { "_signed_short","_short",0},