From b2375fd6e6baf7fd3f4412a58dc943bcac7b7670 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Wed, 26 Mar 2008 08:52:57 +0000 Subject: [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 --- Lib/python/pyclasses.swg | 4 +++- Lib/python/pycontainer.swg | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'Lib/python') 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 -- cgit v1.2.1