Skip to content

Commit 98cb432

Browse files
committed
Warnings fixup
1 parent f8ed75d commit 98cb432

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ static char *PyBytesToUTF8(JSOBJ _obj, JSONTypeContext *tc, size_t *_outLen) {
403403
}
404404

405405
static char *PyUnicodeToUTF8(JSOBJ _obj, JSONTypeContext *tc, size_t *_outLen) {
406-
return (char *)PyUnicode_AsUTF8AndSize(_obj, _outLen);
406+
return (char *)PyUnicode_AsUTF8AndSize(_obj, (Py_ssize_t *)_outLen);
407407
}
408408

409409
/* returns a char* and mutates the pointer to *len */
@@ -488,8 +488,9 @@ static npy_datetime PyDateTimeToEpoch(PyObject *obj, NPY_DATETIMEUNIT base) {
488488
if (!PyDateTime_Check(obj)) {
489489
// TODO: raise TypeError
490490
}
491+
PyDateTime_Date *dt = (PyDateTime_Date *)obj;
491492

492-
ret = convert_pydatetime_to_datetimestruct(obj, &dts);
493+
ret = convert_pydatetime_to_datetimestruct(dt, &dts);
493494
if (ret != 0) {
494495
if (!PyErr_Occurred()) {
495496
PyErr_SetString(PyExc_ValueError,

0 commit comments

Comments
 (0)