STINNER Victor added the comment:
_PyCode_SetExtra() uses two memory block for code extras. By changing how
memory is accessed and allocated, it would be possible to use a single memory
block. Was it on purpose to use two memory blocks?
See for example PyTupleObject which uses a single memory block vs PyListObject
which uses two memory blocks.
typedef struct {
PyObject_VAR_HEAD
PyObject *ob_item[1];
/* ob_item contains space for 'ob_size' elements.
* Items must normally not be NULL, except during construction when
* the tuple is not yet visible outside the function that builds it.
*/
} PyTupleObject;
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue30604>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com