diff options
| author | Victor Stinner <vstinner@python.org> | 2021-10-15 11:56:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-15 11:56:34 +0200 |
| commit | 063abd931f064a4b6b478b0b6e9aa13ee38d2cff (patch) | |
| tree | 76897378967a143a78c18965e4e836224ba98eb9 /Include | |
| parent | 59a633d3e2071d65aa6638da5cf767a5c1310271 (diff) | |
| download | cpython-git-063abd931f064a4b6b478b0b6e9aa13ee38d2cff.tar.gz | |
bpo-35081: Move interpreteridobject.h to Include/internal/ (GH-28969)
Move the interpreteridobject.h header file from Include/ to
Include/internal/. It only provides private functions.
Diffstat (limited to 'Include')
| -rw-r--r-- | Include/internal/pycore_interpreteridobject.h (renamed from Include/cpython/interpreteridobject.h) | 17 | ||||
| -rw-r--r-- | Include/internal/pycore_pymem.h | 2 | ||||
| -rw-r--r-- | Include/interpreteridobject.h | 17 |
3 files changed, 15 insertions, 21 deletions
diff --git a/Include/cpython/interpreteridobject.h b/Include/internal/pycore_interpreteridobject.h index 5076584209..804831e76d 100644 --- a/Include/cpython/interpreteridobject.h +++ b/Include/internal/pycore_interpreteridobject.h @@ -1,11 +1,22 @@ -#ifndef Py_CPYTHON_INTERPRETERIDOBJECT_H -# error "this header file must not be included directly" +/* Interpreter ID Object */ + +#ifndef Py_INTERNAL_INTERPRETERIDOBJECT_H +#define Py_INTERNAL_INTERPRETERIDOBJECT_H +#ifdef __cplusplus +extern "C" { #endif -/* Interpreter ID Object */ +#ifndef Py_BUILD_CORE +# error "this header requires Py_BUILD_CORE define" +#endif PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type; PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t); PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *); PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *); + +#ifdef __cplusplus +} +#endif +#endif // !Py_INTERNAL_INTERPRETERIDOBJECT_H diff --git a/Include/internal/pycore_pymem.h b/Include/internal/pycore_pymem.h index 30db3f2b67..d70deee710 100644 --- a/Include/internal/pycore_pymem.h +++ b/Include/internal/pycore_pymem.h @@ -103,4 +103,4 @@ void _PyObject_VirtualFree(void *, size_t size); #ifdef __cplusplus } #endif -#endif /* !Py_INTERNAL_PYMEM_H */ +#endif // !Py_INTERNAL_PYMEM_H diff --git a/Include/interpreteridobject.h b/Include/interpreteridobject.h deleted file mode 100644 index 8432632f33..0000000000 --- a/Include/interpreteridobject.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef Py_INTERPRETERIDOBJECT_H -#define Py_INTERPRETERIDOBJECT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef Py_LIMITED_API -# define Py_CPYTHON_INTERPRETERIDOBJECT_H -# include "cpython/interpreteridobject.h" -# undef Py_CPYTHON_INTERPRETERIDOBJECT_H -#endif - -#ifdef __cplusplus -} -#endif -#endif /* !Py_INTERPRETERIDOBJECT_H */ |
