◐ Shell
reader mode source ↗
Skip to content

bpo-38205: replace get_small_int(ival) macro with a function version#16270

Closed
ghost wants to merge 1 commit into
masterfrom
unknown repository
Closed

bpo-38205: replace get_small_int(ival) macro with a function version#16270
ghost wants to merge 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Sep 19, 2019

Copy link
Copy Markdown

Use Py_UNREACHABLE() macro in a safe way.

https://bugs.python.org/issue38205

Use Py_UNREACHABLE() macro in a safe way.

@vstinner vstinner 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.

Hide comment

" bpo-38205: replace get_small_int(ival) macro with a function version #16270 "

Wait, https://bugs.python.org/issue38205 is about a macro which became a function and then was revert to a macro again... I don't understand why you make it a function... one more time.

Py_UNREACHABLE() should be fixed, not longobject.c.

@bedevere-bot

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@ghost

ghost commented Sep 19, 2019

Copy link
Copy Markdown
Author

I like the idea of implementing Py_UNREACHABLE() as a function.

+1, close this PR.

@ghost ghost closed this Sep 19, 2019
@ghost

ghost commented Sep 19, 2019

Copy link
Copy Markdown
Author

I don't understand why you make it a function... one more time.

The current code is not consistent:
If "preallocated small integers" enalbed, get_small_int(ival) is a function.
If "preallocated small integers" disabled, get_small_int(ival) is a macro.

@ghost ghost deleted the unreachable branch September 20, 2019 02:47
This pull request was closed.
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.

4 participants