This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Add Py_hexdigits constant: use one unique constant to format a digit to hexadecimal
Type: Stage:
Components: Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vstinner Nosy List: pitrou, python-dev, vstinner
Priority: normal Keywords: patch

Created on 2011-10-01 23:32 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
hexdigits.patch vstinner, 2011-10-01 23:32 review
Messages (4)
msg144754 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-10-01 23:32
CPython source code contains a lot of duplicate "0123456789abcdef" constants, declared as static variables. Attached patch uses one unique variable. Use also Py_hexdigit instead of ((c>9) ? c+'a'-10 : c + '0') in binascii, _hashopenssl, md5, sha1, sha256 and sha512 modules.
msg145489 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-10-14 00:18
New changeset d76338eacf7c by Victor Stinner in branch 'default':
Issue #13088: Add shared Py_hexdigits constant to format a number into base 16
http://hg.python.org/cpython/rev/d76338eacf7c
msg145591 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-10-15 14:15
You broke compilation under Windows.
msg145637 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-10-16 20:13
Antoine fixed the compilation issue.

http://hg.python.org/cpython/rev/c63087ac1f6c
changeset:   72941:c63087ac1f6c
user:        Antoine Pitrou <solipsis@pitrou.net>
date:        Sat Oct 15 16:38:20 2011 +0200

Fix build under Windows
History
Date User Action Args
2022-04-11 14:57:22adminsetgithub: 57297
2011-10-16 20:13:04vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg145637
2011-10-15 14:15:21pitrousetassignee: vstinner

messages: + msg145591
nosy: + pitrou
2011-10-14 00:18:20python-devsetnosy: + python-dev
messages: + msg145489
2011-10-01 23:32:56vstinnercreate