chiark
/
gitweb
/
~mdw
/
catacomb-python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9896381
)
buffer.c: Fix buffer resizing logic.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 21 Jul 2013 14:56:02 +0000
(15:56 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 21 Jul 2013 14:56:02 +0000
(15:56 +0100)
buffer.c
patch
|
blob
|
blame
|
history
diff --git
a/buffer.c
b/buffer.c
index 59a85bfa6e340199a30a717882a0a07c191935ad..9b6e0ff73006f22b0d807df7825dfa2eebe8b638 100644
(file)
--- a/
buffer.c
+++ b/
buffer.c
@@
-340,7
+340,7
@@
static void ensure(PyObject *me, size_t n)
if (BLEFT(b) < n) {
size_t nn = BSZ(b);
octet *p;
- size_t want = BLE
FT
(b) + n;
+ size_t want = BLE
N
(b) + n;
while (nn < want) nn <<= 1;
p = xrealloc(BBASE(b), nn, BSZ(b));
BCUR(b) = p + BLEN(b);