[issue45113] [subinterpreters][C API] Add a new function to create PyStructSequence from Heap.

Hai Shi report at bugs.python.org
Thu Oct 14 01:24:07 EDT 2021


Hai Shi <shihai1991 at 126.com> added the comment:

> The only thing the proposed PR adds is a way to set ht_module, which actually isn't very useful (it's used for module state access.

Hm, there have some static types. so I create the PyStructSequence_FromModuleAndDes() could receive tp_flags and try convert those static types to the heap type. eg: https://github.com/python/cpython/blob/main/Python/sysmodule.c#L2837-L2839
We can not do this converting operation by calling PyStructSequence_NewType(), no?

This is my *reason* to create PR-28573 :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45113>
_______________________________________


More information about the Python-bugs-list mailing list