GH-131238: Core header refactor (GH-131250)

* Moves most structs in pycore_ header files into pycore_structs.h and pycore_runtime_structs.h

* Removes many cross-header dependencies
This commit is contained in:
Mark Shannon 2025-03-17 09:19:04 +00:00 committed by GitHub
parent 3ae67ba97e
commit a1aeec61c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 1481 additions and 1356 deletions

View file

@ -57,6 +57,7 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif
#include "pycore_runtime_structs.h"
#ifdef __clang__
struct timeval;
@ -307,11 +308,6 @@ PyAPI_FUNC(PyTime_t) _PyDeadline_Get(PyTime_t deadline);
// --- _PyTimeFraction -------------------------------------------------------
typedef struct {
PyTime_t numer;
PyTime_t denom;
} _PyTimeFraction;
// Set a fraction.
// Return 0 on success.
// Return -1 if the fraction is invalid.
@ -330,17 +326,6 @@ extern PyTime_t _PyTimeFraction_Mul(
extern double _PyTimeFraction_Resolution(
const _PyTimeFraction *frac);
// --- _Py_time_runtime_state ------------------------------------------------
struct _Py_time_runtime_state {
#if defined(MS_WINDOWS) || defined(__APPLE__)
_PyTimeFraction base;
#else
char _unused;
#endif
};
extern PyStatus _PyTime_Init(struct _Py_time_runtime_state *state);
#ifdef __cplusplus