gh-132775: Add _PyFunction_GetXIData() (gh-133481)

This commit is contained in:
Eric Snow 2025-05-12 16:10:56 -06:00 committed by GitHub
parent 121ed71f4e
commit 8cf4947b0f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 103 additions and 0 deletions

View file

@ -1989,6 +1989,11 @@ get_crossinterp_data(PyObject *self, PyObject *args, PyObject *kwargs)
goto error;
}
}
else if (strcmp(mode, "func") == 0) {
if (_PyFunction_GetXIData(tstate, obj, xidata) != 0) {
goto error;
}
}
else if (strcmp(mode, "script") == 0) {
if (_PyCode_GetScriptXIData(tstate, obj, xidata) != 0) {
goto error;