mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
GH-132983: remove empty_bytes from _zstd module state (#133785)
This commit is contained in:
parent
bbe9c31edc
commit
98e2c3af47
3 changed files with 2 additions and 29 deletions
|
@ -587,11 +587,6 @@ do { \
|
|||
_zstd_state* const mod_state = get_zstd_state(m);
|
||||
|
||||
/* Reusable objects & variables */
|
||||
mod_state->empty_bytes = PyBytes_FromStringAndSize(NULL, 0);
|
||||
if (mod_state->empty_bytes == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
mod_state->CParameter_type = NULL;
|
||||
mod_state->DParameter_type = NULL;
|
||||
|
||||
|
@ -694,8 +689,6 @@ _zstd_traverse(PyObject *module, visitproc visit, void *arg)
|
|||
{
|
||||
_zstd_state* const mod_state = get_zstd_state(module);
|
||||
|
||||
Py_VISIT(mod_state->empty_bytes);
|
||||
|
||||
Py_VISIT(mod_state->ZstdDict_type);
|
||||
Py_VISIT(mod_state->ZstdCompressor_type);
|
||||
|
||||
|
@ -713,8 +706,6 @@ _zstd_clear(PyObject *module)
|
|||
{
|
||||
_zstd_state* const mod_state = get_zstd_state(module);
|
||||
|
||||
Py_CLEAR(mod_state->empty_bytes);
|
||||
|
||||
Py_CLEAR(mod_state->ZstdDict_type);
|
||||
Py_CLEAR(mod_state->ZstdCompressor_type);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue