Skip to content
Open
Prev Previous commit
Next Next commit
cleanup after merge to main
  • Loading branch information
eendebakpt committed Jun 1, 2025
commit b7c9d77f5e5c7de61e31156e0010e9d2db0af8ba
13 changes: 2 additions & 11 deletions Modules/_threadmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# include <signal.h> // SIGINT
#endif


// ThreadError is just an alias to PyExc_RuntimeError
#define ThreadError PyExc_RuntimeError

Expand Down Expand Up @@ -59,14 +58,6 @@ get_thread_state_by_cls(PyTypeObject *cls)
return get_thread_state(module);
}

static inline thread_module_state *
find_state_by_type(PyTypeObject *tp)
{
PyObject *mod = PyType_GetModuleByDef(tp, &thread_module);
assert(mod != NULL);
return get_thread_state(mod);
}


#ifdef MS_WINDOWS
typedef HRESULT (WINAPI *PF_GET_THREAD_DESCRIPTION)(HANDLE, PCWSTR*);
Expand All @@ -78,12 +69,12 @@ static PF_SET_THREAD_DESCRIPTION pSetThreadDescription = NULL;

/*[clinic input]
module _thread
class _thread.iter_locked "iter_locked_object *" "find_state_by_type(type)->iter_locked_type"
class _thread.iter_locked "iter_locked_object *" "clinic_state()->iter_locked_type"
class _thread.lock "lockobject *" "clinic_state()->lock_type"
class _thread.RLock "rlockobject *" "clinic_state()->rlock_type"

[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=6afac42991bc8469]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=1a4bf65233f83eae]*/

#define clinic_state() get_thread_state_by_cls(type)
#include "clinic/_threadmodule.c.h"
Expand Down
4 changes: 2 additions & 2 deletions Modules/clinic/_threadmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading