Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6f6f48d

Browse files
authored
gh-103092: Support subinterpreters in_zstd (#133674)
1 parent3f2f59a commit6f6f48d

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎Modules/_zstd/_zstdmodule.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ static int _zstd_exec(PyObject *module) {
826826
// ZstdDecompressor
827827
if (add_type_to_module(module,
828828
"ZstdDecompressor",
829-
&ZstdDecompressor_type_spec,
829+
&zstddecompressor_type_spec,
830830
&mod_state->ZstdDecompressor_type)<0) {
831831
return-1;
832832
}
@@ -890,9 +890,9 @@ _zstd_free(void *module)
890890

891891
staticstructPyModuleDef_Slot_zstd_slots[]= {
892892
{Py_mod_exec,_zstd_exec},
893+
{Py_mod_multiple_interpreters,Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},
893894
{Py_mod_gil,Py_MOD_GIL_NOT_USED},
894-
895-
{0}
895+
{0,NULL},
896896
};
897897

898898
structPyModuleDef_zstdmodule= {

‎Modules/_zstd/_zstdmodule.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ get_zstd_state_from_type(PyTypeObject *type) {
3232

3333
externPyType_Speczstddict_type_spec;
3434
externPyType_Speczstdcompressor_type_spec;
35-
externPyType_SpecZstdDecompressor_type_spec;
35+
externPyType_Speczstddecompressor_type_spec;
3636

3737
struct_zstd_state {
3838
PyObject*empty_bytes;

‎Modules/_zstd/decompressor.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ static PyType_Slot ZstdDecompressor_slots[] = {
883883
{0}
884884
};
885885

886-
PyType_SpecZstdDecompressor_type_spec= {
886+
PyType_Speczstddecompressor_type_spec= {
887887
.name="_zstd.ZstdDecompressor",
888888
.basicsize=sizeof(ZstdDecompressor),
889889
.flags=Py_TPFLAGS_DEFAULT |Py_TPFLAGS_BASETYPE |Py_TPFLAGS_HAVE_GC,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp