mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
Add a low-level API to access interpreters, for David Beazley.
SF patch #436376.
This commit is contained in:
parent
130fb17578
commit
f5df46d701
2 changed files with 32 additions and 0 deletions
|
@ -264,3 +264,28 @@ PyThreadState_GetDict(void)
|
|||
_PyThreadState_Current->dict = PyDict_New();
|
||||
return _PyThreadState_Current->dict;
|
||||
}
|
||||
|
||||
|
||||
/* Routines for advanced debuggers, requested by David Beazley.
|
||||
Don't use unless you know what you are doing! */
|
||||
|
||||
PyInterpreterState *
|
||||
PyInterpreterState_Head(void)
|
||||
{
|
||||
return interp_head;
|
||||
}
|
||||
|
||||
PyInterpreterState *
|
||||
PyInterpreterState_Next(PyInterpreterState *interp) {
|
||||
return interp->next;
|
||||
}
|
||||
|
||||
PyThreadState *
|
||||
PyInterpreterState_ThreadHead(PyInterpreterState *interp) {
|
||||
return interp->tstate_head;
|
||||
}
|
||||
|
||||
PyThreadState *
|
||||
PyThreadState_Next(PyThreadState *tstate) {
|
||||
return tstate->next;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue