Skip to content

Commit e498905

Browse files
chris-b1jreback
authored andcommitted
BLD: json deprecated unicode capi (#24254)
1 parent 9bc42f9 commit e498905

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,7 @@ static void *PyUnicodeToUTF8(JSOBJ _obj, JSONTypeContext *tc, void *outValue,
433433
}
434434
#endif
435435

436-
newObj = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(obj),
437-
PyUnicode_GET_SIZE(obj), NULL);
436+
newObj = PyUnicode_AsUTF8String(obj);
438437

439438
GET_TC(tc)->newObj = newObj;
440439

0 commit comments

Comments
 (0)