aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/crossinterp.c
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2025-04-28 12:52:36 -0600
committerGitHub <noreply@github.com>2025-04-28 12:52:36 -0600
commit606003ffa9e400cc22cc3b11f31118e2e24f688e (patch)
tree0092345b4c6a33732229dac19606bb073a1a7dad /Python/crossinterp.c
parent31d1342de9489f95384dbc748130c2ae6f092e84 (diff)
downloadcpython-606003ffa9e400cc22cc3b11f31118e2e24f688e.tar.gz
cpython-606003ffa9e400cc22cc3b11f31118e2e24f688e.zip
gh-132775: Add _PyBytes_GetXIData() (gh-133101)
This is the base for several other XIData wrappers, like pickle and marshal. It is essentially a refactor of the existing bytes XIData code.
Diffstat (limited to 'Python/crossinterp.c')
-rw-r--r--Python/crossinterp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/crossinterp.c b/Python/crossinterp.c
index a1dd6b5901d..662c9c72b15 100644
--- a/Python/crossinterp.c
+++ b/Python/crossinterp.c
@@ -154,7 +154,7 @@ _PyXIData_InitWithSize(_PyXIData_t *xidata,
// where it was allocated, so the interpreter is required.
assert(interp != NULL);
_PyXIData_Init(xidata, interp, NULL, obj, new_object);
- xidata->data = PyMem_RawMalloc(size);
+ xidata->data = PyMem_RawCalloc(1, size);
if (xidata->data == NULL) {
return -1;
}