@@ -137,7 +137,7 @@ PyThreadState *slp_initial_tstate = NULL;
137
137
138
138
static void * slp_error_handler = NULL ;
139
139
140
- int
140
+ int
141
141
slp_pickle_with_tracing_state ()
142
142
{
143
143
PyObject * flag , * slp_module ;
@@ -315,7 +315,7 @@ PyStackless_GetCurrentId(void)
315
315
PyThreadState * ts = PyThreadState_GET ();
316
316
#endif
317
317
PyTaskletObject * t = NULL ;
318
- /* if there is threadstate, and there is a main tasklet, then the
318
+ /* if there is threadstate, and there is a main tasklet, then the
319
319
* "current" is the actively running tasklet.
320
320
* If there isn't a "main", then the tasklet in "current" is merely a
321
321
* runnable one
@@ -1144,7 +1144,7 @@ build_args(char *format, va_list va)
1144
1144
return PyTuple_New (0 );
1145
1145
if (args == NULL )
1146
1146
return NULL ;
1147
-
1147
+
1148
1148
if (!PyTuple_Check (args )) {
1149
1149
PyObject * a ;
1150
1150
a = PyTuple_New (1 );
@@ -1674,6 +1674,9 @@ static int init_stackless_methods(void)
1674
1674
int
1675
1675
_PyStackless_InitTypes (void )
1676
1676
{
1677
+ /* record the thread state for thread support */
1678
+ slp_initial_tstate = PyThreadState_GET ();
1679
+
1677
1680
if (0
1678
1681
|| init_stackless_methods ()
1679
1682
|| PyType_Ready (& PyTasklet_Type ) /* need this early for the main tasklet */
@@ -1710,9 +1713,6 @@ PyInit__stackless(void)
1710
1713
)
1711
1714
return NULL ;
1712
1715
1713
- /* record the thread state for thread support */
1714
- slp_initial_tstate = PyThreadState_GET ();
1715
-
1716
1716
/* Create the module and add the functions */
1717
1717
slp_module = PyModule_Create (& stacklessmodule );
1718
1718
if (slp_module == NULL )
0 commit comments