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>
Sat, 11 Apr 2020 11:44:21 +0000 (12:44 +0100)
commit1e2e275eb4f02a53c28fc7617042dbe72a5ba413
treef71e4a0d84737334571340342094cf3b21945f61
parent7c7a6f8e1c7937fb6fdac9ffac97cf1d0e344bb6
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