-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-36097: Use only public C-API in the_xxsubinterpreters module (adding as necessary). #12003
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
ericsnowcurrently
merged 15 commits into
python:master
from
ericsnowcurrently:module-uses-public-api
Mar 1, 2019
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
247de37
Add _PyInterpreterState_GetMainModule().
ericsnowcurrently b498efa
Use PyInterpreterState_GetID().
ericsnowcurrently 3732dde
Fix memory leaks.
ericsnowcurrently 165e96c
Move _PyCrossInterpreterData (and functions) to the public API.
ericsnowcurrently 892ea20
Add _PyInterpreterID_Type and helpers to public API.
ericsnowcurrently b400800
Initialize the ID refcount in _PyInterpreterState_GetIDObject().
ericsnowcurrently 582e520
Fix InterpreterID intialization.
ericsnowcurrently 586d2bf
Fix the makefile.
ericsnowcurrently 405f024
Make a function static.
ericsnowcurrently 1ab3501
Do not call PyType_Ready() twice.
ericsnowcurrently ba9b368
Fix the Windows build.
ericsnowcurrently 5ad779d
_PyCrossInterpreterData_Register_Class -> _PyCrossInterpreterData_Reg…
ericsnowcurrently c7aaefd
Clarify a comment.
ericsnowcurrently b0b4ddb
Add the C++ guard.
ericsnowcurrently 16c0b7b
Only destroy interpreters (by ID refcount) when created by the module.
ericsnowcurrently File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef Py_CPYTHON_INTERPRETERIDOBJECT_H | ||
# error "this header file must not be included directly" | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#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 *); | ||
|
||
PyAPI_FUNC(int64_t) _Py_CoerceID(PyObject *); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
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
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
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 |
---|---|---|
@@ -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 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied
2CFE
from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.