diff --git a/pandas/_libs/src/datetime/np_datetime.c b/pandas/_libs/src/datetime/np_datetime.c index ffb901981f939..f8254ed9d8418 100644 --- a/pandas/_libs/src/datetime/np_datetime.c +++ b/pandas/_libs/src/datetime/np_datetime.c @@ -269,8 +269,8 @@ static void set_datetimestruct_days(npy_int64 days, /* * Compares two pandas_datetimestruct objects chronologically */ -int cmp_pandas_datetimestruct(pandas_datetimestruct *a, - pandas_datetimestruct *b) { +int cmp_pandas_datetimestruct(const pandas_datetimestruct *a, + const pandas_datetimestruct *b) { if (a->year > b->year) { return 1; } else if (a->year < b->year) { diff --git a/pandas/_libs/src/datetime/np_datetime.h b/pandas/_libs/src/datetime/np_datetime.h index a20bff60126aa..af3d2e0f01c1b 100644 --- a/pandas/_libs/src/datetime/np_datetime.h +++ b/pandas/_libs/src/datetime/np_datetime.h @@ -99,6 +99,14 @@ convert_datetimestruct_to_datetime(pandas_datetime_metadata *meta, npy_int64 get_datetimestruct_days(const pandas_datetimestruct *dts); + +/* + * Compares two pandas_datetimestruct objects chronologically + */ +int cmp_pandas_datetimestruct(const pandas_datetimestruct *a, + const pandas_datetimestruct *b); + + /* * Adjusts a datetimestruct based on a minutes offset. Assumes * the current values are valid. diff --git a/setup.py b/setup.py index 793aa089e708f..80be007ba2115 100755 --- a/setup.py +++ b/setup.py @@ -511,7 +511,7 @@ def pxd(name): 'pxdfiles': ['_libs/src/util', '_libs/hashtable'], 'depends': _pxi_dep['join']}, '_libs.reshape': {'pyxfile': '_libs/reshape', - 'depends': _pxi_dep['reshape'], 'include': []}, + 'depends': _pxi_dep['reshape']}, '_libs.interval': {'pyxfile': '_libs/interval', 'pxdfiles': ['_libs/hashtable'], 'depends': _pxi_dep['interval']}, @@ -527,7 +527,7 @@ def pxd(name): 'pandas/_libs/src/parser/io.c']}, '_libs.sparse': {'pyxfile': '_libs/sparse', 'depends': (['pandas/_libs/sparse.pyx'] + - _pxi_dep['sparse']), 'include': []}, + _pxi_dep['sparse'])}, '_libs.testing': {'pyxfile': '_libs/testing', 'depends': ['pandas/_libs/testing.pyx']}, '_libs.hashing': {'pyxfile': '_libs/hashing',