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 07f950e11495e8a7ceef19907615b8f5bb12d845
4 changes: 2 additions & 2 deletions Modules/_randommodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ typedef struct {
uint32_t state[N];
} RandomObject;

#define _RandomObject_CAST(op) ((RandomObject *)(op))
#define RandomObject_CAST(op) ((RandomObject *)(op))

#include "clinic/_randommodule.c.h"

Expand Down Expand Up @@ -571,7 +571,7 @@ random_init(PyObject *self, PyObject *args, PyObject *kwds)
if (PyTuple_GET_SIZE(args) == 1)
arg = PyTuple_GET_ITEM(args, 0);

return random_seed(_RandomObject_CAST(self), arg);
return random_seed(RandomObject_CAST(self), arg);
}


Expand Down