STINNER Victor <[email protected]> added the comment:
> 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. ---------- _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue39087> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
