Skip to content

Commit f0e90d7

Browse files
authored
gh-148829: Move sentinelobject.h to Include/cpython/ (#149186)
This C API is not part of the limited C API, so move it to the CPython C API.
1 parent 9d41e2a commit f0e90d7

5 files changed

Lines changed: 8 additions & 8 deletions

File tree

Include/Python.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ __pragma(warning(disable: 4201))
117117
#include "cpython/genobject.h"
118118
#include "descrobject.h"
119119
#include "genericaliasobject.h"
120-
#include "sentinelobject.h"
120+
#include "cpython/sentinelobject.h"
121121
#include "warnings.h"
122122
#include "weakrefobject.h"
123123
#include "structseq.h"
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
/* Sentinel object interface */
22

3+
#ifndef Py_LIMITED_API
34
#ifndef Py_SENTINELOBJECT_H
45
#define Py_SENTINELOBJECT_H
56
#ifdef __cplusplus
67
extern "C" {
78
#endif
89

9-
#ifndef Py_LIMITED_API
1010
PyAPI_DATA(PyTypeObject) PySentinel_Type;
1111

1212
#define PySentinel_Check(op) Py_IS_TYPE((op), &PySentinel_Type)
1313

1414
PyAPI_FUNC(PyObject *) PySentinel_New(
1515
const char *name,
1616
const char *module_name);
17-
#endif
1817

1918
#ifdef __cplusplus
2019
}
2120
#endif
2221
#endif /* !Py_SENTINELOBJECT_H */
22+
#endif /* !Py_LIMITED_API */

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,6 @@ PYTHON_HEADERS= \
12411241
$(srcdir)/Include/pytypedefs.h \
12421242
$(srcdir)/Include/rangeobject.h \
12431243
$(srcdir)/Include/refcount.h \
1244-
$(srcdir)/Include/sentinelobject.h \
12451244
$(srcdir)/Include/setobject.h \
12461245
$(srcdir)/Include/sliceobject.h \
12471246
$(srcdir)/Include/structmember.h \
@@ -1309,6 +1308,7 @@ PYTHON_HEADERS= \
13091308
$(srcdir)/Include/cpython/pystats.h \
13101309
$(srcdir)/Include/cpython/pythonrun.h \
13111310
$(srcdir)/Include/cpython/pythread.h \
1311+
$(srcdir)/Include/cpython/sentinelobject.h \
13121312
$(srcdir)/Include/cpython/setobject.h \
13131313
$(srcdir)/Include/cpython/sliceobject.h \
13141314
$(srcdir)/Include/cpython/structseq.h \

PCbuild/pythoncore.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@
195195
<ClInclude Include="..\Include\cpython\pystats.h" />
196196
<ClInclude Include="..\Include\cpython\pythonrun.h" />
197197
<ClInclude Include="..\Include\cpython\pythread.h" />
198+
<ClInclude Include="..\Include\cpython\sentinelobject.h" />
198199
<ClInclude Include="..\Include\cpython\setobject.h" />
199200
<ClInclude Include="..\Include\cpython\sliceobject.h" />
200201
<ClInclude Include="..\Include\cpython\structseq.h" />
@@ -384,7 +385,6 @@
384385
<ClInclude Include="..\Include\pytypedefs.h" />
385386
<ClInclude Include="..\Include\rangeobject.h" />
386387
<ClInclude Include="..\Include\refcount.h" />
387-
<ClInclude Include="..\Include\sentinelobject.h" />
388388
<ClInclude Include="..\Include\setobject.h" />
389389
<ClInclude Include="..\Include\sliceobject.h" />
390390
<ClInclude Include="..\Include\structmember.h" />

PCbuild/pythoncore.vcxproj.filters

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,6 @@
222222
<ClInclude Include="..\Include\runtime_structs.h">
223223
<Filter>Include</Filter>
224224
</ClInclude>
225-
<ClInclude Include="..\Include\sentinelobject.h">
226-
<Filter>Include</Filter>
227-
</ClInclude>
228225
<ClInclude Include="..\Include\setobject.h">
229226
<Filter>Include</Filter>
230227
</ClInclude>
@@ -522,6 +519,9 @@
522519
<ClInclude Include="..\Include\cpython\pythread.h">
523520
<Filter>Include\cpython</Filter>
524521
</ClInclude>
522+
<ClInclude Include="..\Include\cpython\sentinelobject.h">
523+
<Filter>Include</Filter>
524+
</ClInclude>
525525
<ClInclude Include="..\Include\cpython\setobject.h">
526526
<Filter>Include\cpython</Filter>
527527
</ClInclude>

0 commit comments

Comments
 (0)