8000 bpo-45953: Statically allocate and initialize global bytes objects. by ericsnowcurrently · Pull Request #30096 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-45953: Statically allocate and initialize global bytes objects. #30096

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 7 commits into from
Jan 11, 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
Drop _PyBytes_reset().
  • Loading branch information
ericsnowcurrently committed Dec 14, 2021
commit 9c3dc1ce0f6da3e6a0f36bfa70bc9d1519ae2d6a
11 changes: 0 additions & 11 deletions Include/internal/pycore_global_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,6 @@ extern "C" {
}, \
}

static inline void
_PyBytes_reset(PyBytesObject *op)
{
// Force a new hash to be generated since the hash seed may have changed.
op->ob_shash = -1;
}


/**********************
* the global objects *
Expand Down Expand Up @@ -620,10 +613,6 @@ struct _Py_global_objects {
static inline void
_Py_global_objects_reset(struct _Py_global_objects *objects)
{
_PyBytes_reset(&objects->singletons.bytes_empty);
for (int i = 0; i < UCHAR_MAX + 1; i++) {
_PyBytes_reset((PyBytesObject *)&objects->singletons.bytes_characters[i]);
}
}

#ifdef __cplusplus
Expand Down
0