Skip to content
Prev Previous commit
Next Next commit
remove unused TkttObject_FAST_CAST macro
  • Loading branch information
picnixz committed Feb 25, 2025
commit 08efc4c3f260f100673d3eee174656d3b11d88d0
5 changes: 3 additions & 2 deletions Modules/_tkinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,8 @@ typedef struct {
PyObject *string; /* This cannot cause cycles. */
} PyTclObject;

// TODO(picnixz): maybe assert that 'op' is really a PyTclObject (we might want
// to also add a FAST_CAST macro to bypass the check if needed).
#define PyTclObject_CAST(op) ((PyTclObject *)(op))

static PyObject *PyTclObject_Type;
Expand Down Expand Up @@ -2698,9 +2700,8 @@ typedef struct {
PyObject *func;
} TkttObject;

#define TkttObject_FAST_CAST(op) ((TkttObject *)(op))
#define TkttObject_CAST(op) \
(assert(TkttObject_Check(op)), TkttObject_FAST_CAST(op))
(assert(TkttObject_Check(op)), ((TkttObject *)(op)))

/*[clinic input]
_tkinter.tktimertoken.deletetimerhandler
Expand Down