]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-95991: Add some infrastructure for testing Limited API in _testcapi (GH-95992)
authorPetr Viktorin <encukou@gmail.com>
Wed, 17 Aug 2022 11:48:43 +0000 (13:48 +0200)
committerGitHub <noreply@github.com>
Wed, 17 Aug 2022 11:48:43 +0000 (13:48 +0200)
commit0f2b469ce1a6f123ad9e151b1771651b3e1d2de6
tree6b11c45f2eaa658bb8e6db56cd92b41435edcbae
parent7276ca25f5f1440aa4d025350d3de15141854dde
gh-95991: Add some infrastructure for testing Limited API in _testcapi (GH-95992)

- Limited API needs to be enabled per source file
- Some builds don't support Limited API, so Limited API tests must be skipped on those builds
  (currently this is `Py_TRACE_REFS`, but that may change.)
- `Py_LIMITED_API` must be defined before `<Python.h>` is included.

This puts the hoop-jumping in `testcapi/parts.h`, so individual
test files can be relatively simple. (Currently that's only
`vectorcall_limited.c`, imagine more.)
Doc/library/test.rst
Lib/test/support/__init__.py
Lib/test/test_call.py
Modules/_testcapi/parts.h
Modules/_testcapi/vectorcall_limited.c
Modules/_testcapimodule.c
PCbuild/_testcapi.vcxproj