Skip to content

Commit ee3a4fb

Browse files
committed
CLN: Fix compile time warnings
This commit suppresses these warnings warning: implicit conversion from enumeration type\ 'NPY_DATETIMEUNIT' to different enumeration type\ 'PANDAS_DATETIMEUNIT' [-Wenum-conversion]
1 parent 20de266 commit ee3a4fb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/src/datetime/np_datetime.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ void pandas_datetime_to_datetimestruct(npy_datetime val, PANDAS_DATETIMEUNIT fr,
576576
}
577577

578578
PANDAS_DATETIMEUNIT get_datetime64_unit(PyObject *obj) {
579-
return ((PyDatetimeScalarObject *) obj)->obmeta.base;
579+
return (PANDAS_DATETIMEUNIT)((PyDatetimeScalarObject *) obj)->obmeta.base;
580580
}
581581

582582

pandas/src/ujson/python/objToJSON.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ static void *NpyDateTimeScalarToJSON(JSOBJ _obj, JSONTypeContext *tc, void *outV
493493
PyDatetimeScalarObject *obj = (PyDatetimeScalarObject *) _obj;
494494
PRINTMARK();
495495

496-
pandas_datetime_to_datetimestruct(obj->obval, obj->obmeta.base, &dts);
496+
pandas_datetime_to_datetimestruct(obj->obval, (PANDAS_DATETIMEUNIT)obj->obmeta.base, &dts);
497497
return PandasDateTimeStructToJSON(&dts, tc, outValue, _outLen);
498498
}
499499

0 commit comments

Comments
 (0)