Skip to content

Commit

Permalink
green_init: Remove const qualifiers from the keyword list passed to P…
Browse files Browse the repository at this point in the history
…yArg_ParseTupleAndKeywords; this eliminates a cast.

Seems unlikely, but it might have something to do with #422
  • Loading branch information
jamadden committed Sep 10, 2024
1 parent 92b92cc commit a97d81f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/greenlet/greenlet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,15 +243,15 @@ green_init(BorrowedGreenlet self, BorrowedObject args, BorrowedObject kwargs)
{
PyArgParseParam run;
PyArgParseParam nparent;
static const char* const kwlist[] = {
static char* kwlist[] = {
"run",
"parent",
NULL
};

// recall: The O specifier does NOT increase the reference count.
if (!PyArg_ParseTupleAndKeywords(
args, kwargs, "|OO:green", (char**)kwlist, &run, &nparent)) {
args, kwargs, "|OO:green", kwlist, &run, &nparent)) {
return -1;
}

Expand Down

0 comments on commit a97d81f

Please sign in to comment.