mirror of https://github.com/python/cpython
bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated. (GH-26808)
* bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated.
This commit is contained in:
parent
be1cb3214d
commit
92c2e91580
|
@ -57,7 +57,7 @@ static const char unable_allocate_msg[] = "Unable to allocate output buffer.";
|
||||||
/* Block size sequence */
|
/* Block size sequence */
|
||||||
#define KB (1024)
|
#define KB (1024)
|
||||||
#define MB (1024*1024)
|
#define MB (1024*1024)
|
||||||
const Py_ssize_t BUFFER_BLOCK_SIZE[] =
|
static const Py_ssize_t BUFFER_BLOCK_SIZE[] =
|
||||||
{ 32*KB, 64*KB, 256*KB, 1*MB, 4*MB, 8*MB, 16*MB, 16*MB,
|
{ 32*KB, 64*KB, 256*KB, 1*MB, 4*MB, 8*MB, 16*MB, 16*MB,
|
||||||
32*MB, 32*MB, 32*MB, 32*MB, 64*MB, 64*MB, 128*MB, 128*MB,
|
32*MB, 32*MB, 32*MB, 32*MB, 64*MB, 64*MB, 128*MB, 128*MB,
|
||||||
OUTPUT_BUFFER_MAX_BLOCK_SIZE };
|
OUTPUT_BUFFER_MAX_BLOCK_SIZE };
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
``BUFFER_BLOCK_SIZE`` is now declared static, to avoid linking collisions when bz2, lmza or zlib are statically linked.
|
Loading…
Reference in New Issue