chiark / gitweb /
buffer.c: Add a lock count which pins a write-buffer's backing store.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 22 Oct 2019 16:14:46 +0000 (17:14 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 25 Nov 2019 17:43:08 +0000 (17:43 +0000)
commit1d460442e7cc36ea3ddebdd8746888afd7999307
tree95241591bfd2c783a1d5d3c7a1e3c4c344afb701
parent45fb29bc9ecaa239759fca77c38f081fee6d62e2
buffer.c: Add a lock count which pins a write-buffer's backing store.

Python 3's buffer protocol allows a long-term acquisition of a buffer's
backing-store address.  It would be Bad if one of our `WriteBuffer'
objects were to reallocate its backing store while something still
thought it had the old address, so keep track of how many times the
buffer has been referenced in this way.

Nothing actually makes use of this machinery yet, but its time will come.
buffer.c