[issue42617] Enhancement request for PyType_FromSpecWIthBases add option for meta class

2020-12-12 Thread Karl Nelson
Karl Nelson added the comment: Perhaps just having PyType_InitHeapFromSpec which have just heap type linkage and slot copy section would help with the issue. The major problem I have is maintaining the slot code which may change at some point in the future. There would still be some

[issue42617] Enhancement request for PyType_FromSpecWIthBases add option for meta class

2020-12-12 Thread hai shi
hai shi added the comment: >This code could be made much safer if there were a >PyType_FromSpecWithBasesMeta which used the meta class to allocate the memory IMHO, `PyType_FromSpecWithBases` is a atomic API of `TypeObject`. Adding a class as a param will result in `PyType_FromSpecWithBases`

[issue42617] Enhancement request for PyType_FromSpecWIthBases add option for meta class

2020-12-10 Thread Karl Nelson
New submission from Karl Nelson : PyType_FromSpecWithBases is missing an argument for taking a meta class. As a result it is necessary to replicate a large portion of Python code when I need to create a new heap type with a specified meta class. This is a maintenance issue as replicating