Add a new API, PyThreadState_DeleteCurrent() that combines

PyThreadState_Delete() and PyEval_ReleaseLock().  It is only defined
if WITH_THREAD is defined.
This commit is contained in:
Guido van Rossum 2001-01-23 01:46:06 +00:00
parent 5f827f4e9b
commit 2975786dec
2 changed files with 30 additions and 4 deletions

View file

@ -66,6 +66,9 @@ DL_IMPORT(void) PyInterpreterState_Delete(PyInterpreterState *);
DL_IMPORT(PyThreadState *) PyThreadState_New(PyInterpreterState *);
DL_IMPORT(void) PyThreadState_Clear(PyThreadState *);
DL_IMPORT(void) PyThreadState_Delete(PyThreadState *);
#ifdef WITH_THREAD
DL_IMPORT(void) PyThreadState_DeleteCurrent(void);
#endif
DL_IMPORT(PyThreadState *) PyThreadState_Get(void);
DL_IMPORT(PyThreadState *) PyThreadState_Swap(PyThreadState *);