Tim Peters <tim.pet...@gmail.com> added the comment: Yup, it's a good idea. In fact, storing info in the debug malloc blocks to identify the API family used was part of "the plan", but got dropped when time ran out.
serialno should not be abused for this purpose, though. On a 32-bit box, a 24-bit real serialno is too small. Mucking with serialno also breaks the current straightforward use of data breakpoints (under systems that support those) to rerun a deterministic program until a specific value for serialno is reached. The original intent was to use one of "forbidden" pad bytes for this purpose, either the last one following the block or the first one preceding the block. That wouldn't interfere with anything, and the code would be substantially simpler (no endless shifting and masking needed when a byte's worth of data is stored /in/ a byte). In any case, internal comments must document the possible values for the "id" and their meanings. It's just plain cruel to make the code reader leap all over the code trying to reverse-engineer the intent ;-) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6836> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com