summaryrefslogtreecommitdiffstats
path: root/Modules/_testinternalcapi.c
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2025-04-30 23:34:05 (GMT)
committerGitHub <noreply@github.com>2025-04-30 23:34:05 (GMT)
commitcb35c11d82efd2959bda0397abcc1719bf6bb0cb (patch)
tree24401105bae0254b93e5d31488fa0a814d0f90be /Modules/_testinternalcapi.c
parent6c522debc218d441756bf631abe8ec8d6c6f1c45 (diff)
downloadcpython-cb35c11d82efd2959bda0397abcc1719bf6bb0cb.zip
cpython-cb35c11d82efd2959bda0397abcc1719bf6bb0cb.tar.gz
cpython-cb35c11d82efd2959bda0397abcc1719bf6bb0cb.tar.bz2
gh-132775: Add _PyPickle_GetXIData() (gh-133107)
There's some extra complexity due to making sure we we get things right when handling functions and classes defined in the __main__ module. This is also reflected in the tests, including the addition of extra functions in test.support.import_helper.
Diffstat (limited to 'Modules/_testinternalcapi.c')
-rw-r--r--Modules/_testinternalcapi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c
index 4bfe88f..812737e 100644
--- a/Modules/_testinternalcapi.c
+++ b/Modules/_testinternalcapi.c
@@ -1939,6 +1939,11 @@ get_crossinterp_data(PyObject *self, PyObject *args, PyObject *kwargs)
goto error;
}
}
+ else if (strcmp(mode, "pickle") == 0) {
+ if (_PyPickle_GetXIData(tstate, obj, xidata) != 0) {
+ goto error;
+ }
+ }
else if (strcmp(mode, "marshal") == 0) {
if (_PyMarshal_GetXIData(tstate, obj, xidata) != 0) {
goto error;