Message320211
> I think the basic implementation problem is that by the time you get to get_hash_info() in sysmodule.c, you no longer have access to the _PyCoreConfig object, nor the _PyMain object that it's generally attached to.
An interpreter now keeps a copy of _PyCoreConfig and _PyMainInterpreterConfig.
See for example make_flags() in sysmodule.c:
_PyCoreConfig *core_config = &_PyGILState_GetInterpreterStateUnsafe()->core_config;
...
PyStructSequence_SET_ITEM(seq, pos++, PyBool_FromLong(core_config->dev_mode));
The interpreter really owns the copy of these configs and they are kept until the interpreter object is destroyed.
Another example:
static PyObject *
import_find_and_load(PyObject *abs_name)
{
...
int import_time = interp->core_config.import_time;
...
} |
|
Date |
User |
Action |
Args |
2018-06-22 07:04:41 | vstinner | set | recipients:
+ vstinner, barry, christian.heimes |
2018-06-22 07:04:41 | vstinner | set | messageid: <1529651081.24.0.56676864532.issue33919@psf.upfronthosting.co.za> |
2018-06-22 07:04:41 | vstinner | link | issue33919 messages |
2018-06-22 07:04:41 | vstinner | create | |
|