Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-111389: expose _PyHASH_INF/BITS/MODULUS/IMAG macros as public#111418

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Changes from1 commit
Commits
Show all changes
18 commits
Select commitHold shift + click to select a range
0ce377a
gh-111389: restoring _PyHASH_INF/BITS/MODULUS/IMAG macroses as public
skirpichevOct 28, 2023
2c6002f
Mention public macros in docs
skirpichevOct 29, 2023
5c42cae
Revert "Mention public macros in docs"
skirpichevOct 30, 2023
de4e3ae
Add Doc/c-api/hashing.rst for hash-related C macros
skirpichevOct 30, 2023
1a50a7b
Expose macroses as unstable API
skirpichevOct 31, 2023
ebe7604
Merge branch 'main' into restore-pyhash-and-pylongnew
skirpichevNov 15, 2023
b7a7ce3
Merge branch 'main' into restore-pyhash-and-pylongnew
skirpichevNov 15, 2023
7080fa9
Expose macros as public and move docs to Doc/c-api/hash.rst
skirpichevNov 15, 2023
9fcd93e
news entry
skirpichevNov 15, 2023
0cc4ff3
restore link to hashing algorithms
skirpichevNov 15, 2023
d978fdb
Merge branch 'main' into restore-pyhash-and-pylongnew
skirpichevNov 16, 2023
00bc891
Update Misc/NEWS.d/next/C API/2023-11-15-09-24-51.gh-issue-111418.FYY…
skirpichevNov 16, 2023
6aaa610
address review: versionadded
skirpichevNov 16, 2023
a8dec64
Move to Include/cpython/pyhash.h
skirpichevNov 16, 2023
d3a61ce
docs nitpick
skirpichevNov 16, 2023
1f3b623
Apply suggestions from code review
skirpichevMar 8, 2024
1dd0fe7
Apply suggestions from review: keep deprecated names as aliases
skirpichevMar 8, 2024
553c663
Add comment
skirpichevMar 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Apply suggestions from review: keep deprecated names as aliases
  • Loading branch information
@skirpichev
skirpichev committedMar 8, 2024
commit1dd0fe709218e9eda2d1aa2a079516c7560c9903
18 changes: 9 additions & 9 deletionsInclude/cpython/pyhash.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,19 +10,19 @@
reduction modulo the prime 2**_PyHASH_BITS - 1. */

#if SIZEOF_VOID_P >= 8
# define_PyHASH_BITS 61
# definePyHASH_BITS 61
#else
# define_PyHASH_BITS 31
# definePyHASH_BITS 31
#endif

#define PyHASH_BITS _PyHASH_BITS
#define PyHASH_MODULUS (((size_t)1 << _PyHASH_BITS) - 1)
#define PyHASH_INF 314159
#define PyHASH_IMAG _PyHASH_MULTIPLIER

#define _PyHASH_MODULUS (((size_t)1 << _PyHASH_BITS) - 1)
#define PyHASH_MODULUS _PyHASH_MODULUS
#define _PyHASH_INF 314159
#define PyHASH_INF _PyHASH_INF
#define _PyHASH_IMAG _PyHASH_MULTIPLIER
#define PyHASH_IMAG _PyHASH_IMAG
#define _PyHASH_BITS PyHASH_BITS
#define _PyHASH_MODULUS PyHASH_MODULUS
#define _PyHASH_INF PyHASH_INF
#define _PyHASH_IMAG PyHASH_IMAG

/* Helpers for hash functions */
PyAPI_FUNC(Py_hash_t) _Py_HashDouble(PyObject *, double);
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp