| 1 |
#ifndef Py_TESTLIMITEDCAPI_PARTS_H |
| 2 |
#define Py_TESTLIMITEDCAPI_PARTS_H |
| 3 |
|
| 4 |
// Always enable assertions |
| 5 |
#undef NDEBUG |
| 6 |
|
| 7 |
#include "pyconfig.h" // Py_GIL_DISABLED |
| 8 |
|
| 9 |
// Use the limited C API |
| 10 |
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API) |
| 11 |
// need limited C API version 3.5 for PyModule_AddFunctions() |
| 12 |
# define Py_LIMITED_API 0x03050000 |
| 13 |
#endif |
| 14 |
|
| 15 |
// Make sure that the internal C API cannot be used. |
| 16 |
#undef Py_BUILD_CORE_MODULE |
| 17 |
#undef Py_BUILD_CORE_BUILTIN |
| 18 |
|
| 19 |
#include "Python.h" |
| 20 |
|
| 21 |
#ifdef Py_BUILD_CORE |
| 22 |
# error "Py_BUILD_CORE macro must not be defined" |
| 23 |
#endif |
| 24 |
|
| 25 |
int _PyTestLimitedCAPI_Init_Abstract(PyObject *module); |
| 26 |
int _PyTestLimitedCAPI_Init_ByteArray(PyObject *module); |
| 27 |
int _PyTestLimitedCAPI_Init_Bytes(PyObject *module); |
| 28 |
int _PyTestLimitedCAPI_Init_Codec(PyObject *module); |
| 29 |
int _PyTestLimitedCAPI_Init_Complex(PyObject *module); |
| 30 |
int _PyTestLimitedCAPI_Init_Dict(PyObject *module); |
| 31 |
int _PyTestLimitedCAPI_Init_Eval(PyObject *module); |
| 32 |
int _PyTestLimitedCAPI_Init_Float(PyObject *module); |
| 33 |
int _PyTestLimitedCAPI_Init_HeaptypeRelative(PyObject *module); |
| 34 |
int _PyTestLimitedCAPI_Init_Import(PyObject *module); |
| 35 |
int _PyTestLimitedCAPI_Init_Object(PyObject *module); |
| 36 |
int _PyTestLimitedCAPI_Init_List(PyObject *module); |
| 37 |
int _PyTestLimitedCAPI_Init_Long(PyObject *module); |
| 38 |
int _PyTestLimitedCAPI_Init_PyOS(PyObject *module); |
| 39 |
int _PyTestLimitedCAPI_Init_Set(PyObject *module); |
| 40 |
int _PyTestLimitedCAPI_Init_Sys(PyObject *module); |
| 41 |
int _PyTestLimitedCAPI_Init_Tuple(PyObject *module); |
| 42 |
int _PyTestLimitedCAPI_Init_Unicode(PyObject *module); |
| 43 |
int _PyTestLimitedCAPI_Init_VectorcallLimited(PyObject *module); |
| 44 |
int _PyTestLimitedCAPI_Init_Version(PyObject *module); |
| 45 |
int _PyTestLimitedCAPI_Init_File(PyObject *module); |
| 46 |
|
| 47 |
#endif // Py_TESTLIMITEDCAPI_PARTS_H |