◐ Shell
clean mode source ↗

[WIP] bpo-35265: Add _PyConfigCtx by vstinner · Pull Request #10574 · python/cpython

@vstinner

* Add _PyConfigCtx structure
* Add "ctx" context (_PyConfigCtx) to _PyCoreConfig, _PyPathConfig,
  _Py_PreInit and PyCalculatePath.
* Move _PyCoreConfig.utf8_mode into _PyConfigCtx
* Replace _PyCoreConfig_INIT with _PyCoreConfig_Init()
* Replace _PyPathConfig_INIT with _PyPathConfig_StaticInit()
* Add new functions:

  * _PyMem_RawMallocCtx()
  * _PyMem_RawCallocCtx()
  * _PyMem_RawReallocCtx()
  *  _PyMem_RawFreeCtx()

* Add ctx paramter to functions:

  * _Py_DecodeLocaleEx()
  * _Py_EncodeLocaleEx()
  * _PyMem_RawWcsdup()

* Use ctx in Python initialization code