Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
Merge branch 'main' into datetime-convert-heap-types
  • Loading branch information
ericsnowcurrently committed May 28, 2024
commit b90d7901fb8fac1b5baf2c01fede260e1f34c2e0
6 changes: 6 additions & 0 deletions Modules/_datetimemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -6871,6 +6871,12 @@ create_timezone_from_delta(int days, int sec, int ms, int normalize)
static int
init_state(datetime_state *st, PyTypeObject *PyDateTime_IsoCalendarDateType)
{
// While datetime uses global module "state", we unly initialize it once.
// The PyLong objects created here (once per process) are not decref'd.
if (st->initialized) {
return 0;
}

/* Static types exposed by the C-API. */
st->date_type = &PyDateTime_DateType;
st->datetime_type = &PyDateTime_DateTimeType;
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.