| 1 |
#ifndef Py_TESTCAPI_PARTS_H |
| 2 |
#define Py_TESTCAPI_PARTS_H |
| 3 |
|
| 4 |
// Always enable assertions |
| 5 |
#undef NDEBUG |
| 6 |
|
| 7 |
#ifdef PYTESTCAPI_NEED_INTERNAL_API |
| 8 |
# ifndef Py_BUILD_CORE_BUILTIN |
| 9 |
# define Py_BUILD_CORE_MODULE 1 |
| 10 |
# endif |
| 11 |
#else |
| 12 |
// The _testcapi extension tests the public C API: header files in Include/ |
| 13 |
// and Include/cpython/ directories. The internal C API must not be tested |
| 14 |
// by _testcapi: use _testinternalcapi for that. |
| 15 |
// |
| 16 |
// _testcapi C files can built with the Py_BUILD_CORE_BUILTIN macro defined |
| 17 |
// if one of the Modules/Setup files asks to build _testcapi as "static" |
| 18 |
// (gh-109723). |
| 19 |
// |
| 20 |
// The Visual Studio projects builds _testcapi with Py_BUILD_CORE_MODULE. |
| 21 |
# undef Py_BUILD_CORE_MODULE |
| 22 |
# undef Py_BUILD_CORE_BUILTIN |
| 23 |
#endif |
| 24 |
|
| 25 |
#include "Python.h" |
| 26 |
|
| 27 |
#if defined(Py_BUILD_CORE) && !defined(PYTESTCAPI_NEED_INTERNAL_API) |
| 28 |
# error "_testcapi must test the public Python C API, not the internal C API" |
| 29 |
#endif |
| 30 |
|
| 31 |
int _PyTestCapi_Init_Vectorcall(PyObject *module); |
| 32 |
int _PyTestCapi_Init_Heaptype(PyObject *module); |
| 33 |
int _PyTestCapi_Init_Abstract(PyObject *module); |
| 34 |
int _PyTestCapi_Init_Bytes(PyObject *module); |
| 35 |
int _PyTestCapi_Init_Unicode(PyObject *module); |
| 36 |
int _PyTestCapi_Init_GetArgs(PyObject *module); |
| 37 |
int _PyTestCapi_Init_DateTime(PyObject *module); |
| 38 |
int _PyTestCapi_Init_Docstring(PyObject *module); |
| 39 |
int _PyTestCapi_Init_Mem(PyObject *module); |
| 40 |
int _PyTestCapi_Init_Watchers(PyObject *module); |
| 41 |
int _PyTestCapi_Init_Long(PyObject *module); |
| 42 |
int _PyTestCapi_Init_Float(PyObject *module); |
| 43 |
int _PyTestCapi_Init_Complex(PyObject *module); |
| 44 |
int _PyTestCapi_Init_Numbers(PyObject *module); |
| 45 |
int _PyTestCapi_Init_Dict(PyObject *module); |
| 46 |
int _PyTestCapi_Init_Set(PyObject *module); |
| 47 |
int _PyTestCapi_Init_List(PyObject *module); |
| 48 |
int _PyTestCapi_Init_Tuple(PyObject *module); |
| 49 |
int _PyTestCapi_Init_Structmember(PyObject *module); |
| 50 |
int _PyTestCapi_Init_Exceptions(PyObject *module); |
| 51 |
int _PyTestCapi_Init_Code(PyObject *module); |
| 52 |
int _PyTestCapi_Init_Buffer(PyObject *module); |
| 53 |
int _PyTestCapi_Init_PyAtomic(PyObject *module); |
| 54 |
int _PyTestCapi_Init_Run(PyObject *module); |
| 55 |
int _PyTestCapi_Init_File(PyObject *module); |
| 56 |
int _PyTestCapi_Init_Codec(PyObject *module); |
| 57 |
int _PyTestCapi_Init_Immortal(PyObject *module); |
| 58 |
int _PyTestCapi_Init_GC(PyObject *module); |
| 59 |
int _PyTestCapi_Init_Hash(PyObject *module); |
| 60 |
int _PyTestCapi_Init_Time(PyObject *module); |
| 61 |
int _PyTestCapi_Init_Monitoring(PyObject *module); |
| 62 |
int _PyTestCapi_Init_Object(PyObject *module); |
| 63 |
int _PyTestCapi_Init_Config(PyObject *mod); |
| 64 |
int _PyTestCapi_Init_Import(PyObject *mod); |
| 65 |
int _PyTestCapi_Init_Frame(PyObject *mod); |
| 66 |
int _PyTestCapi_Init_Type(PyObject *mod); |
| 67 |
int _PyTestCapi_Init_Function(PyObject *mod); |
| 68 |
|
| 69 |
#endif // Py_TESTCAPI_PARTS_H |