bpo-35134, Include: Move pytime.h to cpython/pytime.h (GH-23988)

This change is backward compatible since C extension modules
must not include "pytime.h" directly, but only include "Python.h".
This commit is contained in:
Nicholas Sim 2021-02-16 20:04:38 +08:00 committed by GitHub
parent 871eb4237b
commit 17dbd4078b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 10 deletions

View File

@ -82,7 +82,6 @@
#error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
#endif
#include "pymath.h"
#include "pytime.h"
#include "pymem.h"
#include "object.h"
@ -128,6 +127,7 @@
#include "structseq.h"
#include "namespaceobject.h"
#include "picklebufobject.h"
#include "cpython/pytime.h"
#include "codecs.h"
#include "pyerrors.h"

View File

@ -2,9 +2,6 @@
#ifndef Py_PYTIME_H
#define Py_PYTIME_H
#include "pyconfig.h" /* include for defines */
#include "object.h"
/**************************************************************************
Symbols and macros to supply platform-independent interfaces to time related
functions and constants

View File

@ -1075,7 +1075,6 @@ PYTHON_HEADERS= \
$(srcdir)/Include/pystrtod.h \
$(srcdir)/Include/pythonrun.h \
$(srcdir)/Include/pythread.h \
$(srcdir)/Include/pytime.h \
$(srcdir)/Include/rangeobject.h \
$(srcdir)/Include/setobject.h \
$(srcdir)/Include/sliceobject.h \
@ -1116,6 +1115,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/cpython/pymem.h \
$(srcdir)/Include/cpython/pystate.h \
$(srcdir)/Include/cpython/pythonrun.h \
$(srcdir)/Include/cpython/pytime.h \
$(srcdir)/Include/cpython/sysmodule.h \
$(srcdir)/Include/cpython/traceback.h \
$(srcdir)/Include/cpython/tupleobject.h \

View File

@ -31,7 +31,6 @@
#include "pycore_pyerrors.h"
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pydtrace.h"
#include "pytime.h" // _PyTime_GetMonotonicClock()
typedef struct _gc_runtime_state GCState;

View File

@ -147,6 +147,7 @@
<ClInclude Include="..\Include\cpython\pymem.h" />
<ClInclude Include="..\Include\cpython\pystate.h" />
<ClInclude Include="..\Include\cpython\pythonrun.h" />
<ClInclude Include="..\Include\cpython\pytime.h" />
<ClInclude Include="..\Include\cpython\sysmodule.h" />
<ClInclude Include="..\Include\cpython\traceback.h" />
<ClInclude Include="..\Include\cpython\tupleobject.h" />
@ -245,7 +246,6 @@
<ClInclude Include="..\Include\pystrtod.h" />
<ClInclude Include="..\Include\pythonrun.h" />
<ClInclude Include="..\Include\pythread.h" />
<ClInclude Include="..\Include\pytime.h" />
<ClInclude Include="..\Include\rangeobject.h" />
<ClInclude Include="..\Include\setobject.h" />
<ClInclude Include="..\Include\sliceobject.h" />

View File

@ -204,9 +204,6 @@
<ClInclude Include="..\Include\pymath.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\pytime.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\pymacro.h">
<Filter>Include</Filter>
</ClInclude>
@ -450,6 +447,9 @@
<ClInclude Include="..\Include\cpython\pylifecycle.h">
<Filter>Include\cpython</Filter>
</ClInclude>
<ClInclude Include="..\Include\cpython\pytime.h">
<Filter>Include\cpython</Filter>
</ClInclude>
<ClInclude Include="..\Include\cpython\tupleobject.h">
<Filter>Include\cpython</Filter>
</ClInclude>