Skip to content

Commit 7bdfd34

Browse files
committed
Revert "Return the main thread's short identifier on certain platforms"
This reverts commit 51d6579.
1 parent af1233b commit 7bdfd34

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

Modules/_threadmodule.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,13 +2029,6 @@ An obsolete synonym of allocate_lock().");
20292029
static PyObject *
20302030
thread_get_ident(PyObject *self, PyObject *Py_UNUSED(ignored))
20312031
{
2032-
/* Work around an issue with the main thread ID to failing comparison checks
2033-
due to sign extension on some Linux libc implemenations. Can be removed
2034-
when thread identifiers are reworked. */
2035-
#if SIZEOF_LONG < SIZEOF_LONG_LONG && defined(__linux__) && !defined(__GLIBC__)
2036-
if (_Py_IsMainThread())
2037-
return PyLong_FromUnsignedLong(_PyRuntime.main_thread);
2038-
#endif
20392032
PyThread_ident_t ident = PyThread_get_thread_ident_ex();
20402033
if (ident == PYTHREAD_INVALID_THREAD_ID) {
20412034
PyErr_SetString(ThreadError, "no current thread ident");

0 commit comments

Comments
 (0)