gh-82616: Add Py_IS_TYPE_SIGNED() macro#93178
gh-82616: Add Py_IS_TYPE_SIGNED() macro#93178vstinner merged 2 commits intopython:mainfrom vstinner:is_type_signed
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().
erlend-aasland
left a comment
There was a problem hiding this comment.
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().