8000 gh-131336: fix thread safety for ctypes functions by kumaraditya303 · Pull Request #132232 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-131336: fix thread safety for ctypes functions #132232

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 3 commits into from
Apr 9, 2025
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
add comment
  • Loading branch information
kumaraditya303 committed Apr 9, 2025
commit bfb195ce74ba474b0a731071295fdc1c633fc6b2
2 changes: 2 additions & 0 deletions Modules/_ctypes/_ctypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2845,6 +2845,8 @@ PyCData_GetContainer(CDataObject *self)
}
CDataObject *res = self;
Py_BEGIN_CRITICAL_SECTION(self);
// avoid using return directly in this block because critical section
// needs to be released before returning
if (self->b_objects == NULL) {
if (self->b_length) {
self->b_objects = PyDict_New();
Expand Down
Loading
0