Created
February 3, 2013 17:56
-
-
Save dabeaz/4702829 to your computer and use it in GitHub Desktop.
From Python-3.3 source code, Python/pystate.c. Note the comment: I have no recollection of requesting this feature, but it must have been important at the time ;-).
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
/* 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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@dabeaz can you explain this dark magic ?:))