Files
binutils-gdb/gdb/python
Andrew Burgess bd7a2f22b1 gdb/python: remove Py_TPFLAGS_BASETYPE from gdb.Color
Remove the Py_TPFLAGS_BASETYPE flag from the gdb.Color type.  This
effectively makes gdb.Color final; users can no longer create classes
that inherit from gdb.Color.

Right now I cannot think of any cases where inheritance would be
needed over composition for a simple type like gdb.Color.  If I'm
wrong, then it's easy to add Py_TPFLAGS_BASETYPE back in later, this
would be an extension of the API.  But it's much harder to remove the
flag later as that might break existing user code (note: there has
been no release of GDB yet that includes the gdb.Color type).

Introducing this restriction makes the next commit easier.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
2025-04-23 15:46:22 +01:00
..
2025-04-08 10:54:39 -06:00
2025-04-17 09:25:55 -06:00
2024-04-02 11:21:39 -06:00