Le lun. 30 sept. 2019 à 23:26, Antoine Pitrou <solip...@pitrou.net> a écrit : > I think if you wanted to make the PyConfig apt at providing > ABI-stability, you should have designed it differently. > `PyType_FromSpec` provides a useful model (pass an arbitrary-sized > static array of field initializers).
PyConfig is even more complex than PyTypeObject :-/ The following PyConfig methods allocates memory on the heap using PyMem_RawMalloc(): PyConfig_SetArgv() PyConfig_SetBytesArgv() PyConfig_SetBytesString() PyConfig_SetString() PyConfig_SetWideStringList() Setting a field can fail with a memory allocation failure, preinitialization error, or other errors. But right, I get your point, there are other solutions. Victor -- Night gathers, and now my watch begins. It shall not end until my death. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/KW367IBINBG7OWVOVU4DBWJLZDIII27J/