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 <>
> 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.
Date User Action Args
2019-12-19 09:46:19vstinnersetrecipients: + vstinner, methane, serhiy.storchaka
2019-12-19 09:46:19vstinnersetmessageid: <>
2019-12-19 09:46:19vstinnerlinkissue39087 messages
2019-12-19 09:46:19vstinnercreate