summaryrefslogtreecommitdiff
path: root/Lib/python
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2008-03-26 08:52:57 +0000
committerOlly Betts <olly@survex.com>2008-03-26 08:52:57 +0000
commitb2375fd6e6baf7fd3f4412a58dc943bcac7b7670 (patch)
tree57bd90f953b120616df8dca1bc2c9c1b0d5c9121 /Lib/python
parent7b1cab1554c632df79280f08fd673bccb880fffb (diff)
downloadswig-b2375fd6e6baf7fd3f4412a58dc943bcac7b7670.tar.gz
[Python] Apply GCC 4.3 warnings patch from Philipp Thomas (SF#1925122).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10321 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Lib/python')
-rw-r--r--Lib/python/pyclasses.swg4
-rw-r--r--Lib/python/pycontainer.swg2
2 files changed, 4 insertions, 2 deletions
diff --git a/Lib/python/pyclasses.swg b/Lib/python/pyclasses.swg
index 122025cb8..0caecd697 100644
--- a/Lib/python/pyclasses.swg
+++ b/Lib/python/pyclasses.swg
@@ -74,7 +74,9 @@ namespace swig {
PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj)
{
- if (initial_ref) Py_XINCREF(_obj);
+ if (initial_ref) {
+ Py_XINCREF(_obj);
+ }
}
PyObject_ptr & operator=(const PyObject_ptr& item)
diff --git a/Lib/python/pycontainer.swg b/Lib/python/pycontainer.swg
index b68a11f06..504627760 100644
--- a/Lib/python/pycontainer.swg
+++ b/Lib/python/pycontainer.swg
@@ -448,7 +448,7 @@ namespace swig
~PySequence_Cont()
{
- if (_seq) Py_DECREF(_seq);
+ Py_XDECREF(_seq);
}
size_type size() const