Skip to content

Commit 1ea0283

Browse files
committed
fix: drop const qualifier in cStr
1 parent 15c19c0 commit 1ea0283

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pandas/_libs/src/vendored/ujson/python/objToJSON.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ typedef struct __TypeContext {
106106
double doubleValue;
107107
JSINT64 longValue;
108108

109-
const char *cStr;
109+
char *cStr;
110110
NpyArrContext *npyarr;
111111
PdBlockContext *pdblock;
112112
int transpose;
@@ -1022,10 +1022,10 @@ static int Index_iterNext(JSOBJ obj, JSONTypeContext *tc) {
10221022
}
10231023

10241024
if (index == 0) {
1025-
strcpy((char *)GET_TC(tc)->cStr, "name");
1025+
strcpy(GET_TC(tc)->cStr, "name");
10261026
GET_TC(tc)->itemValue = PyObject_GetAttrString(obj, "name");
10271027
} else if (index == 1) {
1028-
strcpy((char *)GET_TC(tc)->cStr, "data");
1028+
strcpy(GET_TC(tc)->cStr, "data");
10291029
GET_TC(tc)->itemValue = get_values(obj);
10301030
if (!GET_TC(tc)->itemValue) {
10311031
return 0;
@@ -1072,13 +1072,13 @@ static int Series_iterNext(JSOBJ obj, JSONTypeContext *tc) {
10721072
}
10731073

10741074
if (index == 0) {
1075-
strcpy((char *)GET_TC(tc)->cStr, "name");
1075+
strcpy(GET_TC(tc)->cStr, "name");
10761076
GET_TC(tc)->itemValue = PyObject_GetAttrString(obj, "name");
10771077
} else if (index == 1) {
1078-
strcpy((char *)GET_TC(tc)->cStr, "index");
1078+
strcpy(GET_TC(tc)->cStr, "index");
10791079
GET_TC(tc)->itemValue = PyObject_GetAttrString(obj, "index");
10801080
} else if (index == 2) {
1081-
strcpy((char *)GET_TC(tc)->cStr, "data");
1081+
strcpy(GET_TC(tc)->cStr, "data");
10821082
GET_TC(tc)->itemValue = get_values(obj);
10831083
if (!GET_TC(tc)->itemValue) {
10841084
return 0;
@@ -1127,13 +1127,13 @@ static int DataFrame_iterNext(JSOBJ obj, JSONTypeContext *tc) {
11271127
}
11281128

11291129
if (index == 0) {
1130-
strcpy((char *)GET_TC(tc)->cStr, "columns");
1130+
strcpy(GET_TC(tc)->cStr, "columns");
11311131
GET_TC(tc)->itemValue = PyObject_GetAttrString(obj, "columns");
11321132
} else if (index == 1) {
1133-
strcpy((char *)GET_TC(tc)->cStr, "index");
1133+
strcpy(GET_TC(tc)->cStr, "index");
11341134
GET_TC(tc)->itemValue = PyObject_GetAttrString(obj, "index");
11351135
} else if (index == 2) {
1136-
strcpy((char *)GET_TC(tc)->cStr, "data");
1136+
strcpy(GET_TC(tc)->cStr, "data");
11371137
Py_INCREF(obj);
11381138
GET_TC(tc)->itemValue = obj;
11391139
} else {

0 commit comments

Comments
 (0)