Skip to content
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

Remove redundant small int check in long_dealloc #127119

Open
eendebakpt opened this issue Nov 21, 2024 · 0 comments
Open

Remove redundant small int check in long_dealloc #127119

eendebakpt opened this issue Nov 21, 2024 · 0 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@eendebakpt
Copy link
Contributor

eendebakpt commented Nov 21, 2024

Feature or enhancement

Proposal:

The python small ints are immortal with a fixed reference count. For that reason these objects can never reach reference count zero and are never deallocated. We can remove the special casing in long_dealloc. For safety we replace the check with an assert.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

@eendebakpt eendebakpt added the type-feature A feature request or enhancement label Nov 21, 2024
@terryjreedy terryjreedy added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants