8000 bpo-46881: Statically allocate and initialize the latin1 characters. by kumaraditya303 · Pull Request #31616 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
8000

bpo-46881: Statically allocate and initialize the latin1 characters. #31616

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

Merged
merged 8 commits into from
Mar 9, 2022
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
fmt macro
  • Loading branch information
kumaraditya303 authored Mar 3, 2022
commit 7bf2ac520dc26b99b230c5b682ddc828db191ab2
6 changes: 5 additions & 1 deletion Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,11 @@ extern "C" {
*_to++ = (to_type) *_iter++; \
} while (0)

#define LATIN1(ch) (ch < 128 ? (PyObject*)&_Py_SINGLETON(strings).ascii[ch] : (PyObject*)&_Py_SINGLETON(strings).latin1[ch - 128])
#define LATIN1(ch) \
(ch < 128 ? \
(PyObject*)&_Py_SINGLETON(strings).ascii[ch] \
: (PyObject*)&_Py_SINGLETON(strings).latin1[ch - 128])

#ifdef MS_WINDOWS
/* On Windows, overallocate by 50% is the best factor */
# define OVERALLOCATE_FACTOR 2
Expand Down
0