]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-1635741: Refactor _threadmodule.c (GH-23793)
authorVictor Stinner <vstinner@python.org>
Wed, 16 Dec 2020 11:20:33 +0000 (12:20 +0100)
committerGitHub <noreply@github.com>
Wed, 16 Dec 2020 11:20:33 +0000 (12:20 +0100)
commit8203c73f3bb1f51614279b6e23af2ec587d1fa22
treed997485e6f3012a1e40b6e6f6bd955e52f5b6f4e
parent1c653f17cb84d81df3a74ab0b42140d2bb68c5c4
bpo-1635741: Refactor _threadmodule.c (GH-23793)

* Fix ExceptHookArgsType name: "_thread.ExceptHookArgs", instead of
  "_thread._ExceptHookArgs".
* PyInit__thread() no longer intializes interp->num_threads to 0:
  it is already done in PyInterpreterState_New().
* Use PyModule_AddType(), Py_NewRef() and Py_XNewRef().
* Replace str_dict variable with _Py_IDENTIFIER(__dict__).
* Remove assert(Py_IS_TYPE(obj, &Locktype)) from release_sentinel()
  to avoid having to retrive the type from this callback.
* Add thread_bootstate_free()
* Rename t_bootstrap() to thread_run()
* bootstate structure: rename keyw member to kwargs
Modules/_threadmodule.c