Staging
v0.8.1
v0.8.1
Revision 29e46a9a12592b89d81f87245b903486c589695a authored by Guido van Rossum on 02 August 1997, 02:56:48 UTC, committed by Guido van Rossum on 02 August 1997, 02:56:48 UTC
Introduce truly separate (sub)interpreter objects. For now, these must be used by separate threads, created from C. See Demo/pysvr for an example of how to use this. This also rationalizes Python's initialization and finalization behavior: Py_Initialize() -- initialize the whole interpreter Py_Finalize() -- finalize the whole interpreter tstate = Py_NewInterpreter() -- create a new (sub)interpreter Py_EndInterpreter(tstate) -- delete a new (sub)interpreter There are also new interfaces relating to threads and the interpreter lock, which can be used to create new threads, and sometimes have to be used to manipulate the interpreter lock when creating or deleting sub-interpreters. These are only defined when WITH_THREAD is defined: PyEval_AcquireLock() -- acquire the interpreter lock PyEval_ReleaseLock() -- release the interpreter lock PyEval_AcquireThread(tstate) -- acquire the lock and make the thread current PyEval_ReleaseThread(tstate) -- release the lock and make NULL current Other administrative changes: - The header file bltinmodule.h is deleted. - The init functions for Import, Sys and Builtin are now internal and declared in pythonrun.h. - Py_Setup() and Py_Cleanup() are no longer declared. - The interpreter state and thread state structures are now linked together in a chain (the chain of interpreters is a static variable in pythonrun.c). - Some members of the interpreter and thread structures have new, shorter, more consistent, names. - Added declarations for _PyImport_{Find,Fixup}Extension() to import.h.
1 parent 7a2d611
File | Mode | Size |
---|---|---|
Makefile.in | -rw-r--r-- | 2.6 KB |
atof.c | -rw-r--r-- | 2.3 KB |
bltinmodule.c | -rw-r--r-- | 40.1 KB |
ceval.c | -rw-r--r-- | 62.8 KB |
compile.c | -rw-r--r-- | 73.6 KB |
dup2.c | -rw-r--r-- | 691 bytes |
errors.c | -rw-r--r-- | 4.8 KB |
fmod.c | -rw-r--r-- | 1.9 KB |
frozen.c | -rw-r--r-- | 2.3 KB |
frozenmain.c | -rw-r--r-- | 2.3 KB |
getargs.c | -rw-r--r-- | 22.5 KB |
getcompiler.c | -rw-r--r-- | 1.8 KB |
getcopyright.c | -rw-r--r-- | 1.6 KB |
getcwd.c | -rw-r--r-- | 2.8 KB |
getmtime.c | -rw-r--r-- | 1.8 KB |
getopt.c | -rw-r--r-- | 2.2 KB |
getplatform.c | -rw-r--r-- | 1.6 KB |
getversion.c | -rw-r--r-- | 1.7 KB |
graminit.c | -rw-r--r-- | 24.1 KB |
hypot.c | -rw-r--r-- | 309 bytes |
import.c | -rw-r--r-- | 23.6 KB |
importdl.c | -rw-r--r-- | 17.9 KB |
importdl.h | -rw-r--r-- | 2.0 KB |
marshal.c | -rw-r--r-- | 14.9 KB |
memmove.c | -rw-r--r-- | 1.9 KB |
modsupport.c | -rw-r--r-- | 9.9 KB |
mystrtoul.c | -rw-r--r-- | 4.4 KB |
pyfpe.c | -rw-r--r-- | 482 bytes |
pystate.c | -rw-r--r-- | 3.6 KB |
pythonmain.c | -rw-r--r-- | 5.8 KB |
pythonrun.c | -rw-r--r-- | 17.9 KB |
sigcheck.c | -rw-r--r-- | 2.0 KB |
strdup.c | -rw-r--r-- | 321 bytes |
strerror.c | -rw-r--r-- | 1.9 KB |
strtod.c | -rw-r--r-- | 5.1 KB |
structmember.c | -rw-r--r-- | 6.5 KB |
sysmodule.c | -rw-r--r-- | 11.3 KB |
thread.c | -rw-r--r-- | 3.5 KB |
thread_cthread.h | -rw-r--r-- | 4.8 KB |
thread_foobar.h | -rw-r--r-- | 3.8 KB |
thread_lwp.h | -rw-r--r-- | 5.1 KB |
thread_nt.h | -rw-r--r-- | 7.4 KB |
thread_os2.h | -rw-r--r-- | 5.1 KB |
thread_pthread.h | -rw-r--r-- | 10.9 KB |
thread_sgi.h | -rw-r--r-- | 13.0 KB |
thread_solaris.h | -rw-r--r-- | 5.6 KB |
traceback.c | -rw-r--r-- | 6.7 KB |
Computing file changes ...