forked from python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-101524: Only Use Public C-API in the _xxsubinterpreters Modu…
…le (pythongh-105258) The _xxsubinterpreters module was meant to only use public API. Some internal C-API usage snuck in over the last few years (e.g. pythongh-28969). This fixes that.
- Loading branch information
1 parent
9ad199b
commit e6373c0
Showing
11 changed files
with
38 additions
and
36 deletions.
There are no files selected for viewing
17 changes: 3 additions & 14 deletions
17
...ude/internal/pycore_interpreteridobject.h → Include/cpython/interpreteridobject.h
This file contains 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,22 +1,11 @@ | ||
/* Interpreter ID Object */ | ||
|
||
#ifndef Py_INTERNAL_INTERPRETERIDOBJECT_H | ||
#define Py_INTERNAL_INTERPRETERIDOBJECT_H | ||
#ifdef __cplusplus | ||
extern "C" { | ||
#ifndef Py_CPYTHON_INTERPRETERIDOBJECT_H | ||
# error "this header file must not be included directly" | ||
#endif | ||
|
||
#ifndef Py_BUILD_CORE | ||
# error "this header requires Py_BUILD_CORE define" | ||
#endif | ||
/* Interpreter ID Object */ | ||
|
||
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 |
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#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 */ |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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