-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
gh-82616: Add Py_IS_TYPE_SIGNED() macro #93178
Conversation
I did not know about But I hesitate about adding it to the public API. Compilers can complain about "always true/false" condition. And what to do with this in PyPy and bindings in other programming languages? |
1 similar comment
I did not know about But I hesitate about adding it to the public API. Compilers can complain about "always true/false" condition. And what to do with this in PyPy and bindings in other programming languages? |
Ok, I add it as a private macro instead. |
Oh, the Ubtuntu job logs a compiler warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] |
_posixsubprocess: add a static assertion to ensure that the pid_t type is signed. Replace _Py_IntegralTypeSigned() with _Py_IS_TYPE_SIGNED().
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.
Neat trick to get rid of the compiler warning! LGTM, but I'd run it through the buildbots one more time before merging.
Unrelated error: ../configure: line 2692: cannot create temp file for here-document: No space left on device |
Merged, thanks for the reviews. |
_posixsubprocess: add a static assertion to ensure that the pid_t
type is signed.
Replace _Py_IntegralTypeSigned() with Py_IS_TYPE_SIGNED().