This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients methane, serhiy.storchaka, vstinner
Date 2019-12-19.09:46:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576748779.21.0.681480841458.issue39087@roundup.psfhosted.org>
In-reply-to
Content
> The returned object is the owner of the *utf8*.  You need to Py_DECREF() it after
> you finished to using the *utf8*.  The owner may be not the unicode.

Would it be possible to use a "container" object like a Py_buffer? Is there a way to customize the code executed when a Py_buffer is "released"?

Py_buffer would be nice since it already has a pointer attribute (data) and a length attribute, and there is an API to "release" a Py_buffer. It can be marked as read-only, etc.
History
Date User Action Args
2019-12-19 09:46:19vstinnersetrecipients: + vstinner, methane, serhiy.storchaka
2019-12-19 09:46:19vstinnersetmessageid: <1576748779.21.0.681480841458.issue39087@roundup.psfhosted.org>
2019-12-19 09:46:19vstinnerlinkissue39087 messages
2019-12-19 09:46:19vstinnercreate