Skip to content

Commit 2e99092

Browse files
committed
Fix the test.
1 parent ba4c00e commit 2e99092

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Programs/_testembed.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#ifndef Py_BUILD_CORE_MODULE
22
# define Py_BUILD_CORE_MODULE
3-
#include "pystate.h"
43
#endif
54

65
/* Always enable assertion (even in release mode) */
@@ -2342,7 +2341,8 @@ test_get_incomplete_frame(void)
23422341
return result;
23432342
}
23442343

2345-
static void do_gilstate_ensure(void *unused)
2344+
static void
2345+
do_gilstate_ensure(void *unused)
23462346
{
23472347
for (int i = 0; i < 50; ++i) {
23482348
PyGILState_STATE gstate = PyGILState_Ensure();
@@ -2354,9 +2354,9 @@ static void do_gilstate_ensure(void *unused)
23542354
static int
23552355
test_gilstate_after_finalization(void)
23562356
{
2357+
_testembed_Py_Initialize();
23572358
PyThread_handle_t handle;
23582359
PyThread_ident_t ident;
2359-
_testembed_Py_Initialize();
23602360
if (PyThread_start_joinable_thread(&do_gilstate_ensure, NULL, &ident, &handle) < 0) {
23612361
return -1;
23622362
}

0 commit comments

Comments
 (0)