mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00

For the most part, these changes make is substantially easier to backport subinterpreter-related code to 3.12, especially the related modules (e.g. _xxsubinterpreters). The main motivation is to support releasing a PyPI package with the 3.13 capabilities compiled for 3.12. A lot of the changes here involve either hiding details behind macros/functions or splitting up some files.
13 lines
340 B
C
13 lines
340 B
C
|
|
#define _RESOLVE_MODINIT_FUNC_NAME(NAME) \
|
|
PyInit_ ## NAME
|
|
#define RESOLVE_MODINIT_FUNC_NAME(NAME) \
|
|
_RESOLVE_MODINIT_FUNC_NAME(NAME)
|
|
|
|
|
|
static int
|
|
ensure_xid_class(PyTypeObject *cls, crossinterpdatafunc getdata)
|
|
{
|
|
//assert(cls->tp_flags & Py_TPFLAGS_HEAPTYPE);
|
|
return _PyCrossInterpreterData_RegisterClass(cls, getdata);
|
|
}
|