Skip to content

Commit 5982947

Browse files
authored
gh-162350: Add AC vectorcall for zoneinfo.ZoneInfo (#162503)
ZoneInfo AC vectorcall
1 parent 85e3098 commit 5982947

2 files changed

Lines changed: 41 additions & 5 deletions

File tree

‎Modules/_zoneinfo.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ get_weak_cache(zoneinfo_state *state, PyTypeObject *type)
302302
}
303303

304304
/*[clinic input]
305+
@vectorcall
305306
@critical_section
306307
@classmethod
307308
zoneinfo.ZoneInfo.__new__
@@ -313,7 +314,7 @@ Create a new ZoneInfo instance.
313314

314315
static PyObject *
315316
zoneinfo_ZoneInfo_impl(PyTypeObject *type, PyObject *key)
316-
/*[clinic end generated code: output=95e61dab86bb95c3 input=ef73d7a83bf8790e]*/
317+
/*[clinic end generated code: output=95e61dab86bb95c3 input=8cb93934e6a8d11b]*/
317318
{
318319
zoneinfo_state *state = zoneinfo_get_state_by_self(type);
319320
PyObject *instance = zone_from_strong_cache(state, type, key);
@@ -2685,6 +2686,7 @@ static PyType_Slot zoneinfo_slots[] = {
26852686
{Py_tp_methods, zoneinfo_methods},
26862687
{Py_tp_members, zoneinfo_members},
26872688
{Py_tp_new, zoneinfo_ZoneInfo},
2689+
{Py_tp_vectorcall, zoneinfo_ZoneInfo_vectorcall},
26882690
{Py_tp_dealloc, zoneinfo_dealloc},
26892691
{Py_tp_traverse, zoneinfo_traverse},
26902692
{Py_tp_clear, zoneinfo_clear},

‎Modules/clinic/_zoneinfo.c.h‎

Lines changed: 38 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)