STINNER Victor added the comment: + return *(void**)(((char*)type) + slotoffsets[slot]);
New Python versions may add new slots. What do you think of returning NULL if the slot number is higher than the maximum slot? It looks like "#define Py_tp_free 74" is the highest slot number since Python 3.2. For example, Python 3.4 has a new "tp_finalize" slot, but I don't see it in typeslots.h. ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17162> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com