-
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
Misc fixes #452
Misc fixes #452
Conversation
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #452 +/- ##
=======================================
Coverage 84.97% 84.97%
=======================================
Files 49 49
Lines 11738 11738
Branches 2206 2206
=======================================
Hits 9974 9974
Misses 1764 1764
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to test the _PyHASH_MODULUS change on 64-bit Windows. mpz_set_si() accepts a long (32-bit) but _PyHASH_MODULUS is too large. At least that's my first reaction. I will respond later with the test results.
On Sat, Nov 04, 2023 at 02:13:46PM -0700, casevh wrote:
I need to test this on 64-bit Windows. mpz_set_si() accepts a long
(32-bit) but _PyHASH_MODULUS is too large. At least that's my first
reaction. I will respond later with the test results.
Yep, we should use mpz_set_ui().
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's worse than that. 64-bit Windows defines long
as a 32-bit integer and long long
as a 64-bit integer. Most other 64-bit platforms define both long
and long long
as 64-bit integers. GMP expects si
and ui
to be long
and they don't offer functions that accept long long
.
Here is the compile error message with the last change:
\gmpy\src\gmpy2_hash.c(67): warning C4305: 'function': truncation from 'unsigned __int64' to 'unsigned long'
One of the quirks that makes supporting Windows difficult.
Let's just skip the _PyHASH change for now. I found a few other conversion warnings that I need to resolve first.
Ok, first comment was removed. It seems we really want |
Change in |
Thanks for your patience in dealing with these subtle issues. |
Hash-related patch was moved to #453 |
2e96fb6 Avoid computing _PyHASH_MODULUS in GMPy_MPQ_Hash_Slot()324e284 Fix compiler warning8a7b1ff Fix rst markup in docstrings (for emphasis)
12afc77 Use
gmpy2.__package__
to get project name in sphinxb470a3b Set doctest_global_cleanup sphinx directive