Author: gsim
Date: Fri Jan 6 15:15:11 2012
New Revision: 1228226
URL: http://svn.apache.org/viewvc?rev=1228226&view=rev
Log:
QPID-3333: Fix reference counting for Variants, Maps, Lists; patch from Anthony
Foglia
Modified:
qpid/trunk/qpid/cpp/bindings/swig_python_typemaps.i
Modified: qpid/trunk/qpid/cpp/bindings/swig_python_typemaps.i
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/swig_python_typemaps.i?rev=1228226&r1=1228225&r2=1228226&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/swig_python_typemaps.i (original)
+++ qpid/trunk/qpid/cpp/bindings/swig_python_typemaps.i Fri Jan 6 15:15:11 2012
@@ -134,8 +134,6 @@ typedef int Py_ssize_t;
result = 0;
}
- if (result)
- Py_INCREF(result);
return result;
}
@@ -323,32 +321,22 @@ typedef int Py_ssize_t;
*/
%typemap(out) qpid::types::Variant::Map {
$result = MapToPy(&$1);
- if ($result)
- Py_INCREF($result);
}
%typemap(out) qpid::types::Variant::Map& {
$result = MapToPy($1);
- if ($result)
- Py_INCREF($result);
}
%typemap(out) qpid::types::Variant::List {
$result = ListToPy(&$1);
- if ($result)
- Py_INCREF($result);
}
%typemap(out) qpid::types::Variant::List& {
$result = ListToPy($1);
- if ($result)
- Py_INCREF($result);
}
%typemap(out) qpid::types::Variant& {
$result = VariantToPy($1);
- if ($result)
- Py_INCREF($result);
}
/*
@@ -356,8 +344,6 @@ typedef int Py_ssize_t;
*/
%typemap(out) qpid::types::UUID & {
$result = UuidToPy($1);
- if ($result)
- Py_INCREF($result);
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]