Skip to content

gh-131725: Generate GNU hash table in msgfmt.py #131727

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Update Tools/i18n/msgfmt.py
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
  • Loading branch information
StanFromIreland and serhiy-storchaka authored Mar 29, 2025
commit bbbf84d1cae017a1f3f042ffb5fe9d3afc54271d
2 changes: 1 addition & 1 deletion Tools/i18n/msgfmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def hash_insert_entry(string, i):
# Because unsuccessful searches are unlikely this is a good value.
# Formulas: [Knuth, The Art of Computer Programming, Volume 3,
# 766 Sorting and Searching, 1973, Addison Wesley]
hash_tab_size = next_prime((len(sorted(MESSAGES.keys())) * 4) // 3)
hash_tab_size = next_prime((len(MESSAGES) * 4) // 3)
if hash_tab_size <= 2:
hash_tab_size = 3
hash_table = array.array("I", [0] * hash_tab_size)
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy