summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapi/parts.h
blob: 2a043cfa73fa8b80f62fe66010ea26ce151ab1b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef Py_TESTCAPI_PARTS_H
#define Py_TESTCAPI_PARTS_H

// Always enable assertions
#undef NDEBUG

#ifdef PYTESTCAPI_NEED_INTERNAL_API
#  ifndef Py_BUILD_CORE_BUILTIN
#    define Py_BUILD_CORE_MODULE 1
#  endif
#else
   // The _testcapi extension tests the public C API: header files in Include/
   // and Include/cpython/ directories. The internal C API must not be tested
   // by _testcapi: use _testinternalcapi for that.
   //
   // _testcapi C files can built with the Py_BUILD_CORE_BUILTIN macro defined
   // if one of the Modules/Setup files asks to build _testcapi as "static"
   // (gh-109723).
   //
   // The Visual Studio projects builds _testcapi with Py_BUILD_CORE_MODULE.
#  undef Py_BUILD_CORE_MODULE
#  undef Py_BUILD_CORE_BUILTIN
#endif

#include "Python.h"

#if defined(Py_BUILD_CORE) && !defined(PYTESTCAPI_NEED_INTERNAL_API)
#  error "_testcapi must test the public Python C API, not the internal C API"
#endif

int _PyTestCapi_Init_Vectorcall(PyObject *module);
int _PyTestCapi_Init_Heaptype(PyObject *module);
int _PyTestCapi_Init_Abstract(PyObject *module);
int _PyTestCapi_Init_ByteArray(PyObject *module);
int _PyTestCapi_Init_Bytes(PyObject *module);
int _PyTestCapi_Init_Unicode(PyObject *module);
int _PyTestCapi_Init_GetArgs(PyObject *module);
int _PyTestCapi_Init_DateTime(PyObject *module);
int _PyTestCapi_Init_Docstring(PyObject *module);
int _PyTestCapi_Init_Mem(PyObject *module);
int _PyTestCapi_Init_Watchers(PyObject *module);
int _PyTestCapi_Init_Long(PyObject *module);
int _PyTestCapi_Init_Float(PyObject *module);
int _PyTestCapi_Init_Complex(PyObject *module);
int _PyTestCapi_Init_Numbers(PyObject *module);
int _PyTestCapi_Init_Dict(PyObject *module);
int _PyTestCapi_Init_Set(PyObject *module);
int _PyTestCapi_Init_List(PyObject *module);
int _PyTestCapi_Init_Tuple(PyObject *module);
int _PyTestCapi_Init_Structmember(PyObject *module);
int _PyTestCapi_Init_Exceptions(PyObject *module);
int _PyTestCapi_Init_Code(PyObject *module);
int _PyTestCapi_Init_Buffer(PyObject *module);
int _PyTestCapi_Init_PyAtomic(PyObject *module);
int _PyTestCapi_Init_PyOS(PyObject *module);
int _PyTestCapi_Init_File(PyObject *module);
int _PyTestCapi_Init_Codec(PyObject *module);
int _PyTestCapi_Init_Immortal(PyObject *module);
int _PyTestCapi_Init_GC(PyObject *module);
int _PyTestCapi_Init_Sys(PyObject *module);
int _PyTestCapi_Init_Hash(PyObject *module);
int _PyTestCapi_Init_Time(PyObject *module);

#endif // Py_TESTCAPI_PARTS_H