mirror of
https://github.com/python/cpython.git
synced 2025-09-13 12:17:24 +00:00
more low-hanging fruit to make code compile under a C++ compiler. Not
entirely happy with the two new VISIT macros in compile.c, but I couldn't see a better approach.
This commit is contained in:
parent
9176fc1466
commit
7b782b61c5
5 changed files with 102 additions and 70 deletions
|
@ -105,14 +105,14 @@ block_alloc(block *b, size_t size)
|
|||
the default block, allocate a one-off block that is
|
||||
exactly the right size. */
|
||||
/* TODO(jhylton): Think about space waste at end of block */
|
||||
block *new = block_new(
|
||||
block *newbl = block_new(
|
||||
size < DEFAULT_BLOCK_SIZE ?
|
||||
DEFAULT_BLOCK_SIZE : size);
|
||||
if (!new)
|
||||
if (!newbl)
|
||||
return NULL;
|
||||
assert(!b->ab_next);
|
||||
b->ab_next = new;
|
||||
b = new;
|
||||
b->ab_next = newbl;
|
||||
b = newbl;
|
||||
}
|
||||
|
||||
assert(b->ab_offset + size <= b->ab_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue