Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not add an underscore to the macro if none is needed.
  • Loading branch information
picnixz committed Feb 8, 2025
commit 45a1c8787fc7a6d0d876b9ab706b2333582333af
8 changes: 4 additions & 4 deletions Modules/_queuemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ typedef struct {
PyObject *weakreflist;
} simplequeueobject;

#define _simplequeueobject_CAST(op) ((simplequeueobject *)(op))
#define simplequeueobject_CAST(op) ((simplequeueobject *)(op))

/*[clinic input]
module _queue
Expand All @@ -208,15 +208,15 @@ class _queue.SimpleQueue "simplequeueobject *" "simplequeue_get_state_by_type(ty
static int
simplequeue_clear(PyObject *op)
{
simplequeueobject *self = _simplequeueobject_CAST(op);
simplequeueobject *self = simplequeueobject_CAST(op);
RingBuf_Fini(&self->buf);
return 0;
}

static void
simplequeue_dealloc(PyObject *op)
{
simplequeueobject *self = _simplequeueobject_CAST(op);
simplequeueobject *self = simplequeueobject_CAST(op);
PyTypeObject *tp = Py_TYPE(self);

PyObject_GC_UnTrack(self);
Expand All @@ -231,7 +231,7 @@ simplequeue_dealloc(PyObject *op)
static int
simplequeue_traverse(PyObject *op, visitproc visit, void *arg)
{
simplequeueobject *self = _simplequeueobject_CAST(op);
simplequeueobject *self = simplequeueobject_CAST(op);
RingBuf *buf = &self->buf;
for (Py_ssize_t i = 0, num_items = buf->num_items; i < num_items; i++) {
Py_VISIT(RingBuf_At(buf, i));
Expand Down