Skip to content

bpo-35134: Add Include/cpython/pytime.h file #23988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Include/Python.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
#error "PYMALLOC_DEBUG requires WITH_PYMALLOC"
#endif
#include "pymath.h"
#include "pytime.h"
#include "pymem.h"

#include "object.h"
Expand Down Expand Up @@ -128,6 +127,7 @@
#include "structseq.h"
#include "namespaceobject.h"
#include "picklebufobject.h"
#include "cpython/pytime.h"

#include "codecs.h"
#include "pyerrors.h"
Expand Down
3 changes: 0 additions & 3 deletions Include/pytime.h → Include/cpython/pytime.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,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 \
Expand Down Expand Up @@ -1103,6 +1102,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 \
Expand Down
1 change: 0 additions & 1 deletion Modules/gcmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "pycore_pyerrors.h"
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pydtrace.h"
#include "pytime.h" // _PyTime_GetMonotonicClock()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum. Since it's included by Python.h, including it explicitly is not needed, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated these, and moved the pytime.h include further down in Python.h to allow for it. I believe there aren't any other files including pytime.h directly now.


typedef struct _gc_runtime_state GCState;

Expand Down
2 changes: 1 addition & 1 deletion PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
Expand Down Expand Up @@ -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" />
Expand Down
6 changes: 3 additions & 3 deletions PCbuild/pythoncore.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -447,6 +444,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>
Expand Down