Commit Graph

114 Commits

Author SHA1 Message Date
Guido van Rossum bd7dfbc146 Marc-Andre Lemburg: include unicodeobject.h and codecs.h 2000-03-10 22:34:00 +00:00
Guido van Rossum f1176c4815 New version identification scheme.
The version numbers are now exported by Python.h.
Also rolled back the API version change -- it's back to 1007!
1999-01-03 12:40:24 +00:00
Guido van Rossum 43466ec7b0 Add DL_IMPORT(returntype) for all officially exported functions. 1998-12-04 18:48:25 +00:00
Guido van Rossum 2e19bd7cc7 Add Greg Stein's buffer object API. 1998-10-07 14:36:10 +00:00
Guido van Rossum 90ce848848 On SGI, we need to define _SGI_MP_SOURCE before including errno.h when
we are threading, otherwise accessing errno doesn't work right.
1998-05-26 18:38:07 +00:00
Guido van Rossum 29e46a9a12 Mass checkin (more to follow for other directories).
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.
1997-08-02 02:56:48 +00:00
Guido van Rossum 618af4b3ef Include pystate.h earlier so it can be referenced by ceval.h. 1997-07-18 23:59:26 +00:00
Guido van Rossum 2ec9031b55 Subsumed mappingobject.h in dictobject.h. 1997-05-13 21:23:32 +00:00
Guido van Rossum b05a5c7698 Instead of importing graminit.h whenever one of the three grammar 'root'
symbols is needed, define these in Python.h with a Py_ prefix.
1997-05-07 17:46:13 +00:00
Guido van Rossum a027efa5bf Massive changes for separate thread state management.
All per-thread globals are moved into a struct which is manipulated
separately.
1997-05-05 20:56:21 +00:00
Guido van Rossum d27b4f2a3f Several oopsies -- Py_ALLOBJECTS_H -> Py_PYTHON_H, temporarily removed
pystate.h (to be restored later when that code is debugged), removed
accessobject.h.
1997-05-02 04:00:11 +00:00
Guido van Rossum 174f95adf7 Moved allobjects.h to Python.h (without rename2.h).
allobjects.h disappears -- old-style extensions must include Python.h
and rename2.h.
1997-05-02 03:55:52 +00:00
Guido van Rossum caa6380886 The great renaming, phase two: all header files have been updated to
use the new names exclusively, and the linker will see the new names.
Files that import "Python.h" also only see the new names.  Files that
import "allobjects.h" will continue to be able to use the old names,
due to the inclusion (in allobjects.h) of "rename2.h".
1995-01-12 11:45:45 +00:00
Guido van Rossum 956640880d pythonrun.h: added run_pyc_file
ceval.h: added Py_AddPendingCall
rest: modules using the new naming scheme must now include Python.h
1994-09-14 13:23:36 +00:00