mirror of
https://github.com/python/cpython.git
synced 2025-10-14 18:59:46 +00:00

Remove the "cpython/pytime.h" header file: it only contained private functions. Move functions to the internal pycore_time.h header file. Move tests from _testcapi to _testinternalcapi. Rename also test methods to have the same name than tested C functions. No longer export these functions: * _PyTime_Add() * _PyTime_As100Nanoseconds() * _PyTime_FromMicrosecondsClamp() * _PyTime_FromTimespec() * _PyTime_FromTimeval() * _PyTime_GetPerfCounterWithInfo() * _PyTime_MulDiv()
51 lines
1.7 KiB
C
51 lines
1.7 KiB
C
#ifndef Py_TESTCAPI_PARTS_H
|
|
#define Py_TESTCAPI_PARTS_H
|
|
|
|
#include "pyconfig.h" // for Py_TRACE_REFS
|
|
|
|
// Figure out if Limited API is available for this build. If it isn't we won't
|
|
// build tests for it.
|
|
// Currently, only Py_TRACE_REFS disables Limited API.
|
|
#ifdef Py_TRACE_REFS
|
|
#undef LIMITED_API_AVAILABLE
|
|
#else
|
|
#define LIMITED_API_AVAILABLE 1
|
|
#endif
|
|
|
|
// Always enable assertions
|
|
#undef NDEBUG
|
|
|
|
#if !defined(LIMITED_API_AVAILABLE) && defined(Py_LIMITED_API)
|
|
// Limited API being unavailable means that with Py_LIMITED_API defined
|
|
// we can't even include Python.h.
|
|
// Do nothing; the .c file that defined Py_LIMITED_API should also do nothing.
|
|
|
|
#else
|
|
|
|
#include "Python.h"
|
|
|
|
int _PyTestCapi_Init_Vectorcall(PyObject *module);
|
|
int _PyTestCapi_Init_Heaptype(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_Structmember(PyObject *module);
|
|
int _PyTestCapi_Init_Exceptions(PyObject *module);
|
|
int _PyTestCapi_Init_Code(PyObject *module);
|
|
int _PyTestCapi_Init_Buffer(PyObject *module);
|
|
int _PyTestCapi_Init_PyOS(PyObject *module);
|
|
int _PyTestCapi_Init_Immortal(PyObject *module);
|
|
int _PyTestCapi_Init_GC(PyObject *mod);
|
|
|
|
#ifdef LIMITED_API_AVAILABLE
|
|
int _PyTestCapi_Init_VectorcallLimited(PyObject *module);
|
|
int _PyTestCapi_Init_HeaptypeRelative(PyObject *module);
|
|
#endif // LIMITED_API_AVAILABLE
|
|
|
|
#endif
|
|
#endif // Py_TESTCAPI_PARTS_H
|