[Python-checkins] CVS: python/dist/src/Python pystate.c,2.19,2.20
Guido van Rossum
gvanrossum@users.sourceforge.net
Thu, 19 Jul 2001 05:19:29 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv4927
Modified Files:
pystate.c
Log Message:
Add a low-level API to access interpreters, for David Beazley.
SF patch #436376.
Index: pystate.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/pystate.c,v
retrieving revision 2.19
retrieving revision 2.20
diff -C2 -r2.19 -r2.20
*** pystate.c 2001/07/18 16:17:16 2.19
--- pystate.c 2001/07/19 12:19:27 2.20
***************
*** 265,266 ****
--- 265,291 ----
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;
+ }