We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc43fc4 commit 7aa256cCopy full SHA for 7aa256c
1 file changed
Modules/_threadmodule.c
@@ -21,6 +21,7 @@
21
# include <pthread.h>
22
#endif
23
#include <errno.h>
24
+#include <string.h>
25
26
// ThreadError is just an alias to PyExc_RuntimeError
27
#define ThreadError PyExc_RuntimeError
@@ -2541,15 +2542,10 @@ set_native_thread_name(const char *name)
2541
2542
return rc;
2543
}
2544
-/* Helper to encode and truncate thread name; returns new reference or NULL */
2545
+/* Helper to encode and truncate thread name */
2546
static PyObject *
2547
encode_thread_name(PyObject *name_obj, const char *encoding)
2548
{
-#ifdef __sun
2549
- /* Solaris always uses UTF-8 */
2550
- encoding = "utf-8";
2551
-#endif
2552
-
2553
PyObject *name_encoded = PyUnicode_AsEncodedString(name_obj, encoding, "replace");
2554
if (name_encoded == NULL) {
2555
return NULL;
0 commit comments