FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-79315: Remove Include/pylock.h and Include/monitoring.h by vstinner · Pull Request #139731 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .filters  (1) .h  (5) .in  (1) .vcxproj  (1) All 5 file types selected
Only manifest files
Deleted files Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 2 additions & 2 deletions Include/Python.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ __pragma(warning(disable: 4201))
#include "pybuffer.h"
#include "pystats.h"
#include "pyatomic.h"
#include "pylock.h"
#include "cpython/pylock.h"
#include "critical_section.h"
#include "object.h"
#include "refcount.h"
Expand All @@ -105,7 +105,7 @@ __pragma(warning(disable: 4201))
#include "setobject.h"
#include "methodobject.h"
#include "moduleobject.h"
#include "monitoring.h"
#include "cpython/monitoring.h"
#include "cpython/funcobject.h"
#include "cpython/classobject.h"
#include "fileobject.h"
Expand Down
16 changes: 14 additions & 2 deletions Include/cpython/monitoring.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
#ifndef Py_CPYTHON_MONITORING_H
# error "this header file must not be included directly"
#ifndef Py_MONITORING_H
#define Py_MONITORING_H
#ifndef Py_LIMITED_API
#ifdef __cplusplus
extern "C" {
#endif

// There is currently no limited API for monitoring


/* Local events.
* These require bytecode instrumentation */

Expand Down Expand Up @@ -267,3 +273,9 @@ PyMonitoring_FireStopIterationEvent(PyMonitoringState *state, PyObject *codelike
}

#undef _PYMONITORING_IF_ACTIVE

#ifdef __cplusplus
}
#endif
#endif // !Py_LIMITED_API
#endif // !Py_MONITORING_H
15 changes: 13 additions & 2 deletions Include/cpython/pylock.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#ifndef Py_CPYTHON_LOCK_H
# error "this header file must not be included directly"
#ifndef Py_LOCK_H
#define Py_LOCK_H
#ifndef Py_LIMITED_API
#ifdef __cplusplus
extern "C" {
#endif


#define _Py_UNLOCKED 0
#define _Py_LOCKED 1

Expand Down Expand Up @@ -72,3 +76,10 @@ _PyMutex_IsLocked(PyMutex *m)
return (_Py_atomic_load_uint8(&m->_bits) & _Py_LOCKED) != 0;
}
#define PyMutex_IsLocked _PyMutex_IsLocked


#ifdef __cplusplus
}
#endif
#endif // !Py_LIMITED_API
#endif // !Py_LOCK_H
18 changes: 0 additions & 18 deletions Include/monitoring.h

This file was deleted.

16 changes: 0 additions & 16 deletions Include/pylock.h

This file was deleted.

2 changes: 0 additions & 2 deletions Makefile.pre.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1191,14 +1191,12 @@ PYTHON_HEADERS= \
$(srcdir)/Include/intrcheck.h \
$(srcdir)/Include/iterobject.h \
$(srcdir)/Include/listobject.h \
$(srcdir)/Include/pylock.h \
$(srcdir)/Include/longobject.h \
$(srcdir)/Include/marshal.h \
$(srcdir)/Include/memoryobject.h \
$(srcdir)/Include/methodobject.h \
$(srcdir)/Include/modsupport.h \
$(srcdir)/Include/moduleobject.h \
$(srcdir)/Include/monitoring.h \
$(srcdir)/Include/object.h \
$(srcdir)/Include/objimpl.h \
$(srcdir)/Include/opcode.h \
Expand Down
2 changes: 0 additions & 2 deletions Modules/_testcapi/monitoring.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "parts.h"
#include "util.h"

#include "monitoring.h"

#define Py_BUILD_CORE
#include "internal/pycore_instruments.h"

Expand Down
2 changes: 1 addition & 1 deletion PCbuild/pythoncore.vcxproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
<ClInclude Include="..\Include\cpython\memoryobject.h" />
<ClInclude Include="..\Include\cpython\methodobject.h" />
<ClInclude Include="..\Include\cpython\modsupport.h" />
<ClInclude Include="..\Include\cpython\monitoring.h" />
<ClInclude Include="..\Include\cpython\object.h" />
<ClInclude Include="..\Include\cpython\objimpl.h" />
<ClInclude Include="..\Include\cpython\odictobject.h" />
Expand Down Expand Up @@ -332,7 +333,6 @@
<ClInclude Include="..\Include\intrcheck.h" />
<ClInclude Include="..\Include\iterobject.h" />
<ClInclude Include="..\Include\listobject.h" />
<ClInclude Include="..\Include\pylock.h" />
<ClInclude Include="..\Include\longobject.h" />
<ClInclude Include="..\Include\marshal.h" />
<ClInclude Include="..\Include\memoryobject.h" />
Expand Down
3 changes: 0 additions & 3 deletions PCbuild/pythoncore.vcxproj.filters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@
<ClInclude Include="..\Include\listobject.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\pylock.h">
<Filter>Include</Filter>
</ClInclude>
<ClInclude Include="..\Include\longobject.h">
<Filter>Include</Filter>
</ClInclude>
Expand Down
Loading

Back | FazBrowse Home | New Git URL