2024-03-07 14:31:12 -04:00
|
|
|
#ifndef Py_TESTLIMITEDCAPI_PARTS_H
|
|
|
|
#define Py_TESTLIMITEDCAPI_PARTS_H
|
|
|
|
|
|
|
|
// Always enable assertions
|
|
|
|
#undef NDEBUG
|
|
|
|
|
|
|
|
#include "pyconfig.h" // Py_GIL_DISABLED
|
|
|
|
|
|
|
|
// Use the limited C API
|
2024-03-11 11:20:04 -03:00
|
|
|
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API )
|
|
|
|
// need limited C API version 3.5 for PyModule_AddFunctions()
|
|
|
|
# define Py_LIMITED_API 0x03050000
|
2024-03-07 14:31:12 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// Make sure that the internal C API cannot be used.
|
|
|
|
#undef Py_BUILD_CORE_MODULE
|
|
|
|
#undef Py_BUILD_CORE_BUILTIN
|
|
|
|
|
|
|
|
#include "Python.h"
|
|
|
|
|
|
|
|
#ifdef Py_BUILD_CORE
|
|
|
|
# error "Py_BUILD_CORE macro must not be defined"
|
|
|
|
#endif
|
|
|
|
|
2024-03-19 07:44:13 -03:00
|
|
|
int _PyTestLimitedCAPI_Init_Abstract(PyObject *module);
|
2024-03-18 19:06:52 -03:00
|
|
|
int _PyTestLimitedCAPI_Init_ByteArray(PyObject *module);
|
|
|
|
int _PyTestLimitedCAPI_Init_Bytes(PyObject *module);
|
2024-03-19 12:06:20 -03:00
|
|
|
int _PyTestLimitedCAPI_Init_Dict(PyObject *module);
|
2024-03-19 07:44:13 -03:00
|
|
|
int _PyTestLimitedCAPI_Init_Float(PyObject *module);
|
2024-03-18 19:06:52 -03:00
|
|
|
int _PyTestLimitedCAPI_Init_HeaptypeRelative(PyObject *module);
|
|
|
|
int _PyTestLimitedCAPI_Init_List(PyObject *module);
|
2024-03-19 11:04:23 -03:00
|
|
|
int _PyTestLimitedCAPI_Init_Long(PyObject *module);
|
2024-03-18 19:06:52 -03:00
|
|
|
int _PyTestLimitedCAPI_Init_PyOS(PyObject *module);
|
|
|
|
int _PyTestLimitedCAPI_Init_Set(PyObject *module);
|
|
|
|
int _PyTestLimitedCAPI_Init_Sys(PyObject *module);
|
2024-03-19 09:30:39 -03:00
|
|
|
int _PyTestLimitedCAPI_Init_Unicode(PyObject *module);
|
2024-03-18 19:06:52 -03:00
|
|
|
int _PyTestLimitedCAPI_Init_VectorcallLimited(PyObject *module);
|
2024-03-07 14:31:12 -04:00
|
|
|
|
|
|
|
#endif // Py_TESTLIMITEDCAPI_PARTS_H
|