• Kirill Smelkov's avatar
    bigfile/py: Factor out code to "unpin" a buffer to separate functions · 3a8e1beb
    Kirill Smelkov authored
    This code was added in 6da5172e (bigfile/py: Teach storeblk() how to
    correctly propagate traceback on error) to unpin a storeblk pybuf to not
    care whether its refcount == 1 - this way to be able to propagate python
    error upper not caring whether pybuf is still referenced or not.
    
    9aa6a5d7 (bigfile/py: Teach loadblk() to automatically break reference
    cycles to pybuf) adds a note that such unpinning is not strictly
    correct: becuase of other buffer objects were created from pybuf - they
    are copying pointers on initialization and unpinning pybuf won't adjust
    them.
    
    However for loadblk codepath it turned out (see next patch) it is not
    completely possible to unreference pybuf in all cases. For this reason
    loadblk will be falling back to unpinning too.
    
    As a preparatory step move common code to shared functions.
    3a8e1beb
Name
Last commit
Last update
3rdparty Loading commit data...
bigarray Loading commit data...
bigfile Loading commit data...
demo Loading commit data...
include/wendelin Loading commit data...
lib Loading commit data...
t Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
CHANGELOG.rst Loading commit data...
COPYING Loading commit data...
Makefile Loading commit data...
README.rst Loading commit data...
setup.py Loading commit data...
tox.ini Loading commit data...
wendelin.py Loading commit data...