]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46417: time module uses PyStructSequence_NewType() (GH-30734)
authorVictor Stinner <vstinner@python.org>
Fri, 21 Jan 2022 01:52:43 +0000 (02:52 +0100)
committerGitHub <noreply@github.com>
Fri, 21 Jan 2022 01:52:43 +0000 (02:52 +0100)
commit17f268a4ae6190b2659c89c6f32ad2d006e0e3c8
treea823df3bef317346fdd1ae1fdc5b5095ad31133e
parentf389b37fb1cebe7ed66331cdd373a014695261f6
bpo-46417: time module uses PyStructSequence_NewType() (GH-30734)

The time module now creates its struct_time type as a heap
type using PyStructSequence_NewType(), rather than using a static
type.

* Add a module state to the time module: add traverse, clear and free
  functions.
* Use PyModule_AddType().
* Remove the 'initialized' variable.
Modules/timemodule.c