-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Minor refactoring of Object/abstract.c (UNARY_FUNC macro and more cases for BINARY_FUNC) #112145
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
Conversation
(from python#111996) * PyNumber_AsSsize_t: remove inaccessible code (PyLong_AsSsize_t raises OverflowError) * Drop checks for broken float subclasses (like for PyNumber_Long in 31a6554) * Ternary ops (currently only pow/ipow) don't use __r*__ dunders, thus removal of testing last slot in ternary_op() * Use BINARY_FUNC macro for some remaining ops * Add UNARY_FUNC macro to define unary PyNumber_* functions
CC @serhiy-storchaka, this was abstract.c diff from the referenced pr. I hope this can skip issue and news entry... |
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.
It deserves 4 or 5 separate issues.
Huh. Is it worth or code should be kept intact? Reusing old or adding new macros is a secondary issue. All others related to a dead code (for different reasons). So, having something in common. |
@serhiy-storchaka, now this has only UNARY/BINARY_FUNC stuff. Probably this not worth an issue and can skip news. Description was updated. |
…es for BINARY_FUNC) (pythonGH-112145) * Use BINARY_FUNC macro for some remaining ops * Add UNARY_FUNC macro to define unary PyNumber_* functions
…es for BINARY_FUNC) (pythonGH-112145) * Use BINARY_FUNC macro for some remaining ops * Add UNARY_FUNC macro to define unary PyNumber_* functions
// from #111996