From d17a693fa08ce9f2d35acbb1f76e20bdae3e01da Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 9 Nov 2018 16:56:48 +0100 Subject: 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]. --- Objects/codeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/codeobject.c') diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 6d8e9ac154..2450213504 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -39,7 +39,7 @@ intern_strings(PyObject *tuple) if (v == NULL || !PyUnicode_CheckExact(v)) { Py_FatalError("non-string found in code slot"); } - PyUnicode_InternInPlace(&PyTuple_GET_ITEM(tuple, i)); + PyUnicode_InternInPlace(&_PyTuple_ITEMS(tuple)[i]); } } -- cgit v1.2.1