gh-132775: Add _PyCode_GetXIData() (gh-133475)

This commit is contained in:
Eric Snow 2025-05-05 17:46:03 -06:00 committed by GitHub
parent e9616110aa
commit ea598730ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 116 additions and 6 deletions

View file

@ -1984,6 +1984,11 @@ get_crossinterp_data(PyObject *self, PyObject *args, PyObject *kwargs)
goto error;
}
}
else if (strcmp(mode, "code") == 0) {
if (_PyCode_GetXIData(tstate, obj, xidata) != 0) {
goto error;
}
}
else {
PyErr_Format(PyExc_ValueError, "unsupported mode %R", modeobj);
goto error;