Skip to content

Commit 8de9528

Browse files
committed
fix: cast kwargs to char ** for older python
1 parent 573b8ff commit 8de9528

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/_libs/src/parser/json.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,10 @@ PyObject *json_loads(PyObject *Py_UNUSED(self), PyObject *args,
121121
const char *buf;
122122
Py_ssize_t len;
123123
int *precise_float; // Unused. It's declared for compatibility with old parser
124-
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|b", kwlist, &buf, &len,
125-
&precise_float)) {
124+
if (!PyArg_ParseTupleAndKeywords(
125+
args, kwargs, "s#|b",
126+
const_cast<char **>(kwlist), // cast for python<3.13
127+
&buf, &len, &precise_float)) {
126128
return NULL;
127129
}
128130

0 commit comments

Comments
 (0)