summaryrefslogtreecommitdiffstats
path: root/libshiboken/conversions.h
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-03-05 15:37:11 -0300
committerHugo Lima <hugo.lima@openbossa.org>2010-03-18 19:45:06 -0300
commit1a259891dfe104c204da3ae06bc3e3924e98de26 (patch)
tree289fe092a101f9a218477fba99f439b1e3036d5f /libshiboken/conversions.h
parent7dc3fd531da613df2ffee3ae152c316021bb0e2a (diff)
downloadshiboken-1a259891dfe104c204da3ae06bc3e3924e98de26.tar.gz
shiboken-1a259891dfe104c204da3ae06bc3e3924e98de26.tar.xz
shiboken-1a259891dfe104c204da3ae06bc3e3924e98de26.zip
Fix reference leak in StdPair converter.
Diffstat (limited to 'libshiboken/conversions.h')
-rw-r--r--libshiboken/conversions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h
index e40ebf2f..38605c4d 100644
--- a/libshiboken/conversions.h
+++ b/libshiboken/conversions.h
@@ -532,8 +532,8 @@ struct Converter_std_pair
static StdPair toCpp(PyObject* pyobj)
{
StdPair result;
- PyObject* pyFirst = PySequence_GetItem(pyobj, 0);
- PyObject* pySecond = PySequence_GetItem(pyobj, 1);
+ AutoDecRef pyFirst(PySequence_GetItem(pyobj, 0));
+ AutoDecRef pySecond(PySequence_GetItem(pyobj, 1));
result.first = Converter<typename StdPair::first_type>::toCpp(pyFirst);
result.second = Converter<typename StdPair::second_type>::toCpp(pySecond);
return result;