Skip to content

Commit 2a7a294

Browse files
Description of pandas_datetime_exec function. (#61635)
1 parent dc1e367 commit 2a7a294

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandas/_libs/src/datetime/pd_datetime.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ static npy_datetime PyDateTimeToEpoch(PyObject *dt, NPY_DATETIMEUNIT base) {
192192
return npy_dt;
193193
}
194194

195+
/* Initializes and exposes a customer datetime C-API from the pandas library
196+
* by creating a PyCapsule that stores function pointers, which can be accessed
197+
* later by other C code or Cython code that imports the capsule.
198+
*/
195199
static int pandas_datetime_exec(PyObject *Py_UNUSED(module)) {
196200
PyDateTime_IMPORT;
197201
PandasDateTime_CAPI *capi = PyMem_Malloc(sizeof(PandasDateTime_CAPI));

0 commit comments

Comments
 (0)