You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Anthony Foglia (Updated) (JIRA)" <ji...@apache.org> on 2011/12/27 00:18:31 UTC
[jira] [Updated] (QPID-3333) Make Python SWIG bindings a drop-in
replacement for pure Python qpid.messaging package
[ https://issues.apache.org/jira/browse/QPID-3333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anthony Foglia updated QPID-3333:
---------------------------------
Attachment: 0014-Fix-reference-counting.patch
This is a patch to fix the reference counting when passing objects from C++ to Python. As described on the mailing list last month (http://qpid.2158936.n2.nabble.com/Memory-leak-in-QPID-SWIG-Python-Bindings-td7001193.html), objects returned from the C++ library had one too many references set in the swig wrapper. This patch fixes that.
Here's some example code run with the patch. (Without the patch, the refcount is 2, which is incorrect.)
{code}
>>> import cqpid, sys
>>> m = cqpid.Message(content={"foo": [5, 10]})
>>> m.content
{'foo': [5L, 10L]}
>>> sys.getrefcount(m.content)
1
{code}
> Make Python SWIG bindings a drop-in replacement for pure Python qpid.messaging package
> --------------------------------------------------------------------------------------
>
> Key: QPID-3333
> URL: https://issues.apache.org/jira/browse/QPID-3333
> Project: Qpid
> Issue Type: Improvement
> Components: C++ Client
> Affects Versions: 0.11, Future
> Reporter: Anthony Foglia
> Assignee: Gordon Sim
> Attachments: 0001-Wrap-NoMessageAvailable-as-Empty-exception.patch, 0002-Change-Connection-interface-to-match-pure-python.patch, 0003-Change-Session-interface-to-match-pure-python.patch, 0004-Change-Receiver-interface-to-match-pure-python.patch, 0005-Change-Sender-interface-to-match-pure-python.patch, 0006-Change-Message-interface-to-match-pure-python.patch, 0007-Handle-connection-options.patch, 0008-Fixes-and-more-improvements-to-Message-objects.patch, 0009-Wrap-more-exceptions-2011-08-26.patch, 0009-Wrap-more-exceptions-2011-08-26.patch, 0009-Wrapping-of-more-exceptions.patch, 0010-Add-session-property-to-senders-and-receivers.patch, 0011-Wrap-returned-UUIDs-as-Python-UUIDs.patch, 0012-Add-connection-property-to-Session-object.patch, 0012-Add-connection-property-to-Session-object.patch, 0013-Handle-amqp-list-and-amqp-map-content.patch, 0013-Handle-amqp-list-and-amqp-map-content.patch, 0014-Fix-reference-counting.patch, 9900-Wrap-qpid-framing-NotAttachedException.patch, 9900-Wrap-qpid-framing-NotAttachedException.patch
>
>
> These patches are make the compile Python SWIG bindings to the C++ client much closer to a drop-in replacement for the Python qpid.messaging package.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org