Skip to content

Commit 3c640a8

Browse files
change _ctypes_test static globals to thread local
1 parent 4b15d10 commit 3c640a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Modules/_ctypes/_ctypes_test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ typedef struct {
8181
} TestReg;
8282

8383

84-
EXPORT(TestReg) last_tfrsuv_arg = {0};
84+
_Py_thread_local EXPORT(TestReg) last_tfrsuv_arg = {0};
8585

8686

8787
EXPORT(void)
@@ -741,8 +741,8 @@ EXPORT(void) _py_func(void)
741741
{
742742
}
743743

744-
EXPORT(long long) last_tf_arg_s = 0;
745-
EXPORT(unsigned long long) last_tf_arg_u = 0;
744+
_Py_thread_local EXPORT(long long) last_tf_arg_s = 0;
745+
_Py_thread_local EXPORT(unsigned long long) last_tf_arg_u = 0;
746746

747747
struct BITS {
748748
signed int A: 1, B:2, C:3, D:4, E: 5, F: 6, G: 7, H: 8, I: 9;

0 commit comments

Comments
 (0)