Erlend Egeberg Aasland <erlend.aasl...@innova.no> added the comment:

After GH-24533 and GH-24535, there's (AFAICS) only a handful of cases left.
$ grep -r "\->tp_" Include/:

Include/internal/pycore_abstract.h:    PyNumberMethods *tp_as_number = 
Py_TYPE(obj)->tp_as_number;
Include/internal/pycore_interp.h:    unsigned int version;  // initialized from 
type->tp_version_tag
Include/internal/pycore_object.h:    return ((type->tp_flags & feature) != 0);
Include/internal/pycore_object.h:    Py_ssize_t offset = 
Py_TYPE(op)->tp_weaklistoffset;
Include/internal/pycore_object.h:            && (Py_TYPE(obj)->tp_is_gc == NULL
Include/internal/pycore_object.h:                || 
Py_TYPE(obj)->tp_is_gc(obj)));
Include/cpython/pyerrors.h:#define PyExceptionClass_Name(x)  
(((PyTypeObject*)(x))->tp_name)
Include/cpython/abstract.h:    offset = tp->tp_vectorcall_offset;
Include/cpython/abstract.h:    ( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) )
Include/cpython/object.h:    ((PyMemberDef *)(((char *)etype) + 
Py_TYPE(etype)->tp_basicsize))
Include/cpython/objimpl.h:#define _PyObject_SIZE(typeobj) ( 
(typeobj)->tp_basicsize )
Include/cpython/objimpl.h:    _Py_SIZE_ROUND_UP((typeobj)->tp_basicsize + \
Include/cpython/objimpl.h:        (nitems)*(typeobj)->tp_itemsize,        \
Include/cpython/objimpl.h:#define PyType_SUPPORTS_WEAKREFS(t) 
((t)->tp_weaklistoffset > 0)
Include/object.h:    flags = type->tp_flags;

Should we strive to fix the cases in Include/internal as well?

----------

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

Reply via email to