8000 gh-101524: Only Use Public C-API in the _xxsubinterpreters Module by ericsnowcurrently · Pull Request #105258 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-101524: Only Use Public C-API in the _xxsubinterpreters Module #105258

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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Drop internal includes from _xxsubinterpreters.
  • Loading branch information
ericsnowcurrently committed Jun 2, 2023
commit 452f99e0f2914d070e535829db068df7b203482b
7 changes: 2 additions & 5 deletions Modules/_xxsubinterpretersmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

#include "Python.h"
#include "interpreteridobject.h"
// XXX This module should not rely on internal API.
#include "pycore_frame.h"
#include "pycore_pystate.h" // _PyThreadState_GET()


#define MODULE_NAME "_xxsubinterpreters"
Expand Down Expand Up @@ -376,7 +373,7 @@ _is_running(PyInterpreterState *interp)
}

assert(!PyErr_Occurred());
_PyInterpreterFrame *frame = tstate->cframe->current_frame;
struct _PyInterpreterFrame *frame = tstate->cframe->current_frame;
if (frame == NULL) {
return 0;
}
Expand Down Expand Up @@ -512,7 +509,7 @@ interp_create(PyObject *self, PyObject *args, PyObject *kwds)
}

// Create and initialize the new interpreter.
PyThreadState *save_tstate = _PyThreadState_GET();
PyThreadState *save_tstate = PyThreadState_Get();
assert(save_tstate != NULL);
const PyInterpreterConfig config = isolated
? (PyInterpreterConfig)_PyInterpreterConfig_INIT
Expand Down
0