[Patches] [ python-Patches-436376 ] C API Request

noreply@sourceforge.net noreply@sourceforge.net
Tue, 26 Jun 2001 06:30:28 -0700


Patches item #436376, was opened at 2001-06-26 06:30
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=436376&group_id=5470

Category: core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: C API Request

Initial Comment:
I would like to have the following 4 C API functions
added to
pystate.c so that advanced extension modules can more
easily examine the internal state of the Python
interpreter and its threads.

The intent of these functions is to provide a mechanism
for
gaining portable read-only access to all of the current
PyThreadState * structures.  The primary use of this
would be in advanced debugging applications.

Cheers,

Dave Beazley

-------------------------------------------

/* included in pystate.c */

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;
}





----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=436376&group_id=5470