-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-59705: Add _thread.set_name() function #127338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
c6d324d
63b5d52
9f6a8ab
d79e7af
ebd9752
a7f5651
97ea645
78a9ab9
dcf13f4
6ea7e5a
46721bb
6962116
5d27da0
b713910
5c20ea1
6088b37
3c12d17
bde935f
0584ca3
7508b6c
f4a9f40
ac6d726
08e5922
681624e
f57339f
3941123
2e27043
6ab2944
b370c49
beeae59
ae956a0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -2384,7 +2384,11 @@ _thread__get_name_impl(PyObject *module) | |||||||
return PyErr_SetFromErrno(PyExc_OSError); | ||||||||
} | ||||||||
|
||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On what platform it does not add the null byte? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The null byte is added on all supported platforms. Before I made sure that the buffer always ended with a null byte, but @serhiy-storchaka asked me to remove it. Let's be optimistic. We can adjust the code later if needed. |
||||||||
#ifdef __sun | ||||||||
return PyUnicode_DecodeUTF8(name, strlen(name), "surrogateescape"); | ||||||||
#else | ||||||||
return PyUnicode_DecodeFSDefault(name); | ||||||||
vstinner marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
#endif | ||||||||
} | ||||||||
#endif // HAVE_PTHREAD_GETNAME_NP | ||||||||
|
||||||||
|
Uh oh!
There was an error while loading. Please reload this page.