Eryk Sun <eryk...@gmail.com> added the comment:

mmap no longer allows resizing if the object has buffer exports. For example:

    >>> m = mmap.mmap(-1, 4096, access=mmap.ACCESS_WRITE)
    >>> p = (ctypes.c_char * 4096).from_buffer(m)
    >>> m.resize(8192)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    BufferError: mmap can't resize with extant buffers exported.

    >>> del p
    >>> m.resize(8192)
    >>> len(m)
    8192

----------
nosy: +eryksun
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue12957>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to