From 579e99ea8c58f3a7d11d5e7549cb3383a68500a5 Mon Sep 17 00:00:00 2001 From: Hugo Lima Date: Fri, 5 Mar 2010 15:38:41 -0300 Subject: Do not incref and decref the python dict reference on python to c++ conversions. --- libshiboken/conversions.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'libshiboken') diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h index 38605c4da..8d9cddf1f 100644 --- a/libshiboken/conversions.h +++ b/libshiboken/conversions.h @@ -571,16 +571,11 @@ struct Converter_std_map PyObject* value; Py_ssize_t pos = 0; - Py_INCREF(pyobj); - while (PyDict_Next(pyobj, &pos, &key, &value)) { result.insert(typename StdMap::value_type( Converter::toCpp(key), Converter::toCpp(value))); } - - Py_DECREF(pyobj); - return result; } }; -- cgit v1.2.3