Le dimanche 06 juillet 2008 à 00:28 +0200, "Martin v. Löwis" a écrit : > I propose that new codes s*, t*, w* are added, and that s#,t#,w# refuses > objects which implement a releasebuffer procedure (alternatively, s# etc > might be removed altogether right away). Users of s* then need to pass > in a Py_Buffer view pointer that gets filled, and need to explicitly > release the buffer. For convenience, it might help if the Py_buffer > structure includes a borrowed PyObject* to the underlying object, along > with a PyBuffer_Release procedure/macro.
Why a borrowed reference rather than a new one? It could be decref'ed as part as the proposed PyBuffer_Release procedure. Overall it sounds like a clean resolution of the problem. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com