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 Do not use _ + capital letter in new code as it is also UB.
  • Loading branch information
picnixz committed Feb 8, 2025
commit 72737d076ac4358ba60063a95c7599fff620040c
6 changes: 3 additions & 3 deletions Modules/_winapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ typedef struct {
Py_buffer write_buffer;
} OverlappedObject;

#define _OverlappedObject_CAST(op) ((OverlappedObject *)(op))
#define OverlappedObject_CAST(op) ((OverlappedObject *)(op))

/*
Note: tp_clear (overlapped_clear) is not implemented because it
Expand All @@ -154,7 +154,7 @@ quite complex and can fail (see: overlapped_dealloc).
static int
overlapped_traverse(PyObject *op, visitproc visit, void *arg)
{
OverlappedObject *self = _OverlappedObject_CAST(op);
OverlappedObject *self = OverlappedObject_CAST(op);
Py_VISIT(self->read_buffer);
Py_VISIT(self->write_buffer.obj);
Py_VISIT(Py_TYPE(self));
Expand All @@ -166,7 +166,7 @@ overlapped_dealloc(PyObject *op)
{
DWORD bytes;
int err = GetLastError();
OverlappedObject *self = _OverlappedObject_CAST(op);
OverlappedObject *self = OverlappedObject_CAST(op);

PyObject_GC_UnTrack(self);
if (self->pending) {
Expand Down