reference count bugs in DrawXXXList fixed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -829,6 +829,10 @@ public:
|
||||
|
||||
|
||||
%addmethods {
|
||||
// NOTE: These methods are VERY SIMILAR in implentation. It would be
|
||||
// nice to factor out code and or turn them into a set of
|
||||
// template-like macros.
|
||||
|
||||
// Draw a point for every set of coordinants in pyPoints, optionally
|
||||
// setting a new pen for each
|
||||
PyObject* _DrawPointList(PyObject* pyPoints, PyObject* pyPens) {
|
||||
@@ -860,6 +864,8 @@ public:
|
||||
obj = PySequence_GetItem(pyPens, i);
|
||||
}
|
||||
if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err1;
|
||||
}
|
||||
|
||||
@@ -876,6 +882,7 @@ public:
|
||||
obj = PySequence_GetItem(pyPoints, i);
|
||||
}
|
||||
if (! _2int_seq_helper(obj, &x1, &y1)) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err0;
|
||||
}
|
||||
@@ -930,6 +937,8 @@ public:
|
||||
obj = PySequence_GetItem(pyPens, i);
|
||||
}
|
||||
if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err1;
|
||||
}
|
||||
|
||||
@@ -946,6 +955,7 @@ public:
|
||||
obj = PySequence_GetItem(pyLines, i);
|
||||
}
|
||||
if (! _4int_seq_helper(obj, &x1, &y1, &x2, &y2)) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err0;
|
||||
}
|
||||
|
@@ -9481,6 +9481,8 @@ static PyObject * wxDC__DrawPointList(wxDC *self,PyObject * pyPoints,PyObject *
|
||||
obj = PySequence_GetItem(pyPens, i);
|
||||
}
|
||||
if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err1;
|
||||
}
|
||||
|
||||
@@ -9497,6 +9499,7 @@ static PyObject * wxDC__DrawPointList(wxDC *self,PyObject * pyPoints,PyObject *
|
||||
obj = PySequence_GetItem(pyPoints, i);
|
||||
}
|
||||
if (! _2int_seq_helper(obj, &x1, &y1)) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err0;
|
||||
}
|
||||
@@ -9586,6 +9589,8 @@ static PyObject * wxDC__DrawLineList(wxDC *self,PyObject * pyLines,PyObject * py
|
||||
obj = PySequence_GetItem(pyPens, i);
|
||||
}
|
||||
if (SWIG_GetPtrObj(obj, (void **) &pen, "_wxPen_p")) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err1;
|
||||
}
|
||||
|
||||
@@ -9602,6 +9607,7 @@ static PyObject * wxDC__DrawLineList(wxDC *self,PyObject * pyLines,PyObject * py
|
||||
obj = PySequence_GetItem(pyLines, i);
|
||||
}
|
||||
if (! _4int_seq_helper(obj, &x1, &y1, &x2, &y2)) {
|
||||
if (!isFastPens)
|
||||
Py_DECREF(obj);
|
||||
goto err0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user