[issue3560] redundant "base" field in memoryview objects

Antoine Pitrou report at bugs.python.org
Fri Aug 15 22:19:54 CEST 2008


Antoine Pitrou <pitrou at free.fr> added the comment:

Ok, here is a simple patch. It:
- moves the struct definition at the end of memoryobject.h with a
comment that the definition should not be considered public
- adds two macros for accessing the underlying Py_buffer* and PyObject*,
respectively
- removes the ill-named PyMemoryView() macro (PyMemoryView_GET_BUFFER()
can be used instead)
- renames PyMemory_Check() to PyMemoryView_Check()
- renames PyMemoryView_FromMemory() to PyMemoryView_FromBuffer()

I didn't try to clean up the existing documentation comments, although I
find them difficult to follow. I also didn't change anything in the
semantics and implementation of the memoryview object.

Let me know what you think.

----------
keywords: +patch
Added file: http://bugs.python.org/file11119/memapi.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3560>
_______________________________________


More information about the Python-bugs-list mailing list