-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
bpo-29859: Fix error messages from return codes for pthread_* calls #741
Conversation
Python/thread_pthread.h
Outdated
@@ -143,6 +143,7 @@ typedef struct { | |||
} pthread_lock; | |||
|
|||
#define CHECK_STATUS(name) if (status != 0) { perror(name); error = 1; } | |||
#define CHECK_STATUS_PTHREAD(name) if (status != 0) { char* strerror_msg = strerror(status); fprintf(stderr, "%s: %s\n", name, strerror_msg); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
temporary variable seems redundant.
fprintf(stderr, "%s: %s\n", name, strerror(status))
is enough, maybe.
You removed error = 1;
. Is it intended change?
Please wrap line within 79 columns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, I have updated the PR. Should I squash both commits?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use "Squash and merge" button always.
So there is no need to create "crean commit log" in pull request branch.
Would you add an entry to Misc/NEWS
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Uh, NEWS cause conflict. Could you merge origin/master? |
I rebased my branch against upstream/master. |
Fix error messages from return codes for pthread_* calls
Before (example call to
PyThread_release_lock
):After (example call to
PyThread_release_lock
):