FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Minor refactoring of Object/abstract.c (UNARY_FUNC macro and more cases for BINARY_FUNC) by skirpichev · Pull Request #112145 · python/cpython · GitHub

/ cpython Public

Minor refactoring of Object/abstract.c (UNARY_FUNC macro and more cases for BINARY_FUNC) - #112145

Merged
serhiy-storchaka merged 5 commits into
python:mainfrom
skirpichev:abstract-refactor
Dec 5, 2023
Merged

Minor refactoring of Object/abstract.c (UNARY_FUNC macro and more cases for BINARY_FUNC)#112145
serhiy-storchaka merged 5 commits into
python:mainfrom
skirpichev:abstract-refactor

Conversation

skirpichev commented Nov 16, 2023
edited
Loading

Copy link
Copy Markdown
Member
  • Use BINARY_FUNC macro for some remaining ops
  • Add UNARY_FUNC macro to define unary PyNumber_* functions

// from #111996

(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

Copy link
Copy Markdown
Member Author

CC @serhiy-storchaka, this was abstract.c diff from the referenced pr. I hope this can skip issue and news entry...

serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It deserves 4 or 5 separate issues.

Comment thread Objects/abstract.c Outdated

Copy link
Copy Markdown
Member Author

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.

skirpichev changed the title Minor refactoring of Object/abstract.c Minor refactoring of Object/abstract.c (UNARY_FUNC macro and more cases for BINARY_FUNC) Dec 3, 2023

skirpichev commented Dec 3, 2023
edited
Loading

Copy link
Copy Markdown
Member Author

@serhiy-storchaka, now this has only UNARY/BINARY_FUNC stuff. Probably this not worth an issue and can skip news.

Description was updated.

serhiy-storchaka merged commit 9f92b31 into python:main Dec 5, 2023
skirpichev deleted the abstract-refactor branch December 5, 2023 07:41
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
…es for BINARY_FUNC) (pythonGH-112145)

* Use BINARY_FUNC macro for some remaining ops
* Add UNARY_FUNC macro to define unary PyNumber_* functions
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…es for BINARY_FUNC) (pythonGH-112145)

* Use BINARY_FUNC macro for some remaining ops
* Add UNARY_FUNC macro to define unary PyNumber_* functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL