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

Minor improvements of _tablesz implementation #39126

Merged
merged 2 commits into from
May 17, 2022

Conversation

bkamins
Copy link
Member

@bkamins bkamins commented Jan 6, 2021

Probably this does not affect any Julia Base code, but in general the original code was not type stable and safe:

Before the PR:

julia> Base._tablesz(true) # now it will be an error
16

julia> Base._tablesz(Int32(20)) # now it will be Int32(32)
0

Probably this does not affect any Julia Base code, but in general the original code was not type stable and safe:

Before the PR:
```
julia> Base._tablesz(true) # now it will be an error
16

julia> Base._tablesz(Int32(20)) # now it will be Int32(32)
0
```
@bkamins bkamins requested a review from nalimilan January 6, 2021 19:37
Copy link
Member

@nalimilan nalimilan left a comment

Choose a reason for hiding this comment

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

Sounds reasonable. Though another solution would be to only accept Int if that's the only thing that's used in Base.

@bkamins
Copy link
Member Author

bkamins commented Jan 6, 2021

Agreed. Probably @JeffBezanson should decide what is preferred (Int would be cleaner, but for some reason the original implementation allowed Integer).

@StefanKarpinski
Copy link
Sponsor Member

@JeffBezanson: input from you required to make progress here so I've assigned the issue to you.

@KristofferC KristofferC added the status:merge me PR is reviewed. Merge when all tests are passing label May 17, 2022
@KristofferC KristofferC merged commit 7bff5cd into JuliaLang:master May 17, 2022
@bkamins bkamins deleted the patch-24 branch May 17, 2022 16:45
@giordano giordano removed the status:merge me PR is reviewed. Merge when all tests are passing label Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants