mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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:
parent
3ae67ba97e
commit
a1aeec61c4
57 changed files with 1481 additions and 1356 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue