FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.14] gh-103092: Support subinterpreters in ``_zstd`` (GH-133674) by miss-islington · Pull Request #133695 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (2) .h  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
6 changes: 3 additions & 3 deletions Modules/_zstd/_zstdmodule.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ static int _zstd_exec(PyObject *module) {
// ZstdDecompressor
if (add_type_to_module(module,
"ZstdDecompressor",
&ZstdDecompressor_type_spec,
&zstddecompressor_type_spec,
&mod_state->ZstdDecompressor_type) < 0) {
return -1;
}
Expand Down Expand Up @@ -890,9 +890,9 @@ _zstd_free(void *module)

static struct PyModuleDef_Slot _zstd_slots[] = {
{Py_mod_exec, _zstd_exec},
{Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
{Py_mod_gil, Py_MOD_GIL_NOT_USED},

{0}
{0, NULL},
};

struct PyModuleDef _zstdmodule = {
Expand Down
2 changes: 1 addition & 1 deletion Modules/_zstd/_zstdmodule.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ get_zstd_state_from_type(PyTypeObject *type) {

extern PyType_Spec zstddict_type_spec;
extern PyType_Spec zstdcompressor_type_spec;
extern PyType_Spec ZstdDecompressor_type_spec;
extern PyType_Spec zstddecompressor_type_spec;

struct _zstd_state {
PyObject *empty_bytes;
Expand Down
2 changes: 1 addition & 1 deletion Modules/_zstd/decompressor.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ static PyType_Slot ZstdDecompressor_slots[] = {
{0}
};

PyType_Spec ZstdDecompressor_type_spec = {
PyType_Spec zstddecompressor_type_spec = {
.name = "_zstd.ZstdDecompressor",
.basicsize = sizeof(ZstdDecompressor),
.flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
Expand Down

Back | FazBrowse Home | New Git URL