Skip to content

gh-93374: Remove redundant check in PyLong_FromString() from Objects/longobject.c#93375

Closed
ghost wants to merge 2 commits into
mainfrom
unknown repository
Closed

gh-93374: Remove redundant check in PyLong_FromString() from Objects/longobject.c#93375
ghost wants to merge 2 commits into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented May 31, 2022

Copy link
Copy Markdown

Issue #93374.

The if (log_base_BASE[base] == 0.0) check in line 2405 of Objects/longobject.c is redundant:

  • static double log_base_BASE[37] = {0.0e0,}; (line 2401) appears just above it;
  • at the point at which if (log_base_BASE[base] == 0.0) appears, base is guaranteed to be an integer in the closed interval [2, 36].

@ghost ghost closed this May 31, 2022
@ghost

ghost commented May 31, 2022

Copy link
Copy Markdown
Author

My mistake. Seem to have forgotten about the static.

@ghost ghost deleted the fix-issue-anon branch May 31, 2022 12:41
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.

1 participant