-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fix compiler warning in _mpfr_hash() #453
Conversation
Also drop some inaccessible code in GMPy_MPC_Hash_Slot()
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #453 +/- ##
==========================================
- Coverage 84.97% 84.96% -0.01%
==========================================
Files 49 49
Lines 11738 11736 -2
Branches 2206 2204 -2
==========================================
- Hits 9974 9972 -2
Misses 1764 1764
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
I think the only issue with using |
Oops. Sorry about the confusion. I missed that. Again, sorry about my confusion. |
@casevh, actually I didn't expect this PR will be merged immediately. Rather it was factored out to discuss hashing of NaN's. Here is the old discussion (keep in mind next time it's better to comment code in pr, e.g. "File changed" tab, not individual commits: this will be more transparent to other readers): 324e284#commitcomment-131773663 So, using PyBaseObject_Type.tp_hash is an exact equivalent of I think we have these options:
(1) looks to be better for me, it's hard to imagine where new public interface could be used. Only for hashing of NaN's: https://github.com/python/cpython/blob/ba8aa1fd3735aa3dd13a36ad8f059a422d25ff37/Doc/library/stdtypes.rst?plain=1#L789-L790 |
I agree that option (1) is the best choice and that any changes are unlikely. |
Ok, I've asked this in python/cpython#111389. |
Also drop some inaccessible code in GMPy_MPC_Hash_Slot()
This is cherry-picked from #452. Old discussion: 324e284#commitcomment-131773663