]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35199: Add an internal _PyTuple_ITEMS() macro (GH-10434)
authorVictor Stinner <vstinner@redhat.com>
Fri, 9 Nov 2018 15:56:48 +0000 (16:56 +0100)
committerGitHub <noreply@github.com>
Fri, 9 Nov 2018 15:56:48 +0000 (16:56 +0100)
commitd17a693fa08ce9f2d35acbb1f76e20bdae3e01da
treed3cd55ed960c8444a7411f1c21fc631ee19447c9
parent130893debfd97c70e3a89d9ba49892f53e6b9d79
bpo-35199: Add an internal _PyTuple_ITEMS() macro (GH-10434)

* _PyTuple_ITEMS() gives access to the tuple->ob_item field and cast the
  first argument to PyTupleObject*. This internal macro is only usable if
  Py_BUILD_CORE is defined.
* Replace &PyTuple_GET_ITEM(ob, 0) with _PyTuple_ITEMS(ob).
* Replace PyTuple_GET_ITEM(op, 1) with &_PyTuple_ITEMS(ob)[1].
Include/tupleobject.h
Modules/_functoolsmodule.c
Modules/_testcapimodule.c
Objects/call.c
Objects/codeobject.c
Objects/descrobject.c
Objects/funcobject.c
Python/ceval.c
Python/getargs.c