Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reconsider capi name
  • Loading branch information
neonene committed Apr 21, 2024
commit a426e8f7234b8176084cb0f65a326b2b1d685251
24 changes: 12 additions & 12 deletions Modules/_datetimemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -1054,16 +1054,16 @@ new_datetime_ex(int year, int month, int day, int hour, int minute,
}

static PyObject *
new_datetime_capi(int year, int month, int day, int hour, int minute,
int second, int usecond, PyObject *tzinfo,
PyTypeObject *type)
new_datetime_nofold_capi(int year, int month, int day, int hour, int minute,
int second, int usecond, PyObject *tzinfo,
PyTypeObject *type)
{
return new_datetime_ex(year, month, day, hour, minute, second,
usecond, tzinfo, type);
}

static PyObject *
new_datetime_fold_capi(int year, int month, int day, int hour, int minute,
new_datetime_capi(int year, int month, int day, int hour, int minute,
int second, int usecond, PyObject *tzinfo, int fold,
PyTypeObject *type)
{
Expand Down Expand Up @@ -1169,15 +1169,15 @@ new_time_ex2(int hour, int minute, int second, int usecond,
}

static PyObject *
new_time_capi(int hour, int minute, int second, int usecond,
PyObject *tzinfo, PyTypeObject *type)
new_time_nofold_capi(int hour, int minute, int second, int usecond,
PyObject *tzinfo, PyTypeObject *type)
{
return new_time_ex2(hour, minute, second, usecond, tzinfo, 0, type);
}

static PyObject *
new_time_fold_capi(int hour, int minute, int second, int usecond,
PyObject *tzinfo, int fold, PyTypeObject *type)
new_time_capi(int hour, int minute, int second, int usecond,
PyObject *tzinfo, int fold, PyTypeObject *type)
{
return new_time_ex2(hour, minute, second, usecond, tzinfo, fold, type);
}
Expand Down Expand Up @@ -6773,14 +6773,14 @@ get_datetime_capi(void)
capi->DeltaType = &PyDateTime_DeltaType;
capi->TZInfoType = &PyDateTime_TZInfoType;
capi->Date_FromDate = new_date_capi;
capi->DateTime_FromDateAndTime = new_datetime_capi;
capi->Time_FromTime = new_time_capi;
capi->DateTime_FromDateAndTime = new_datetime_nofold_capi;
capi->Time_FromTime = new_time_nofold_capi;
capi->Delta_FromDelta = new_delta_capi;
capi->TimeZone_FromTimeZone = new_timezone_capi;
capi->DateTime_FromTimestamp = datetime_fromtimestamp_capi;
capi->Date_FromTimestamp = datetime_date_fromtimestamp_capi;
capi->DateTime_FromDateAndTimeAndFold = new_datetime_fold_capi;
capi->Time_FromTimeAndFold = new_time_fold_capi;
capi->DateTime_FromDateAndTimeAndFold = new_datetime_capi;
capi->Time_FromTimeAndFold = new_time_capi;
// Make sure this function is called after utc has
// been initialized.
datetime_state *st = STATIC_STATE();
Expand Down