Josh Rosenberg added the comment:

On further checking, looks like there is a lot of work that should be done to 
initialize heap types (see PyType_FromSpecWithBases) that 
PyStructSequeuence_Init2 doesn't do (because it thinks it's working on a static 
type). I think the solution here is decouple PyStructSequeuence_NewType from 
PyStructSequeuence_Init2 (or to minimize code duplication, make both of them 
call a third internal function that accepts additional flags, e.g. to make the 
type a HEAPTYPE, BASETYPE, or both, and performs the additional work required 
for those flags if given); Init2 clearly expects a static type, and 
definitionally, NewType is producing a heap/dynamic type.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28709>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to