Commit Graph

413 Commits

Author SHA1 Message Date
Guido van Rossum 2e6e7d4b7a Changes for long file support by Steve Clift. 1999-01-06 18:39:42 +00:00
Guido van Rossum d3b0921f57 Chris Herborth writes:
Donn Cave tells me the PyImport_BeImageID() function isn't needed anymore.
1999-01-04 16:39:38 +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 a8b47fe5c6 I can't seem to do anything right :-)
As Chris H. points out, I should have added 'extern' to the
declaration of _PyThreadState_Current.  Here it is.
1998-12-21 20:21:19 +00:00
Guido van Rossum 65d5b5763c Thanks to Chris Herborth, the thread primitives now have proper Py*
names in the source code (they already had those for the linker,
through some smart macros; but the source still had the old, un-Py names).
1998-12-21 19:32:43 +00:00
Guido van Rossum 275ea67e6b Add macro version of PyThreadState_GET(). This uses
_PyThreadState_Current, defined in pystate.c.
1998-12-21 18:28:10 +00:00
Guido van Rossum cc34faaf14 Add prototypes for PyOS_strto[u]l -- Chris Herborth. 1998-12-10 16:54:17 +00:00
Guido van Rossum f0f3600d0b Undo the change here -- there's no point in declaring a static
function as DL_IMPORT()!
1998-12-08 13:23:22 +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 7531d507c1 New API version (enough has changed!). 1998-12-03 18:18:12 +00:00
Barry Warsaw d052ff0e57 Added PyExc_NotImplementedError 1998-12-01 18:34:01 +00:00
Guido van Rossum 446fd04009 Metrowerks PRO4 finally fixes the hypot snafu. (Jack Jansen) 1998-11-02 16:21:39 +00:00
Guido van Rossum d1f2d7eede Bump the patch level to 1.5.2b2, just in case I feel like releasing
next week. :-)
1998-10-24 19:47:34 +00:00
Guido van Rossum 36eef3c173 Changes by Greg Stein (code) and GvR (design).
Add a new member to the PyBufferProcs struct, bf_getcharbuffer.  For
backward compatibility, this member should only be used (this includes
testing for NULL!) when the flag Py_TPFLAGS_HAVE_GETCHARBUFFER is set
in the type structure, below.  Note that if its flag is not set, we
may be looking at an extension module compiled for 1.5.1, which will
have garbage at the bf_getcharbuffer member (because the struct wasn't
as long then).  If the flag is one, the pointer may still be NULL.
The function found at this member is used in a similar manner as
bf_getreadbuffer, but it is known to point to 8-bit character data.
(See discussion in getargs.c checked in later.)

As a general feature for extending the type structure and the various
structures that (may) hang off it in a backwards compatible way, we
rename the tp_xxx4 "spare" slot to tp_flags.  In 1.5.1 and before,
this slot was always zero.  In 1.5.1, it may contain various flags
indicating extra fields that weren't present in 1.5.1.  The only flag
defined so far is for the bf_getcharbuffer member of the PyBufferProcs
struct.

Note that the new spares (tp_xxx5 - tp_xxx8), once they become used,
should also be protected by a flag (or flags) in tp_flags.
1998-10-08 02:10:56 +00:00
Guido van Rossum d076c73cc8 Changes to support other object types besides strings
as the code string of code objects, as long as they support
the (readonly) buffer interface.  By Greg Stein.
1998-10-07 19:42: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 b7c61318d8 Up version to 1.5a2 -- we're close enough (even though I'm still
expecting some contributions).
1998-10-02 03:17:29 +00:00
Guido van Rossum 6e5b301b02 Renamed thread.h to pythread.h. 1998-10-01 20:59:37 +00:00
Guido van Rossum 2c69336507 On second though, NEXITFUNCS should be defined in pythonrun.c and not
here; pystate.h doesn't use it (I thought I wanted to move the array
there but that won't work).
1998-10-01 16:02:31 +00:00
Guido van Rossum 03dc5384d7 Move the #include of <sys/select> to *after* mytime.h (or <time.h>),
as this is the logical order of dependencies.  Suggested by Jeff Rush.
1998-09-28 22:05:22 +00:00
Guido van Rossum 78694d970f Patches from Greg Stein to support 'P' format in struct module's
native format, as void* (translated to Python int or long).
Also adds PyLong_FromVoidPtr and PyLong_AsVoidPtr to longobject.c.
1998-09-18 14:14:13 +00:00
Guido van Rossum 1d2e9d19fe Duplicate the decls for PySys_WriteStd{out,err} here so the VC++
compiler doesn't grumble.  Greg Stein's suggestion.
1998-09-17 14:00:22 +00:00
Guido van Rossum 3293b07df5 Patch by Mark Hammond to support 64-bit ints on MS platforms.
The MS compiler doesn't call it 'long long', it uses __int64,
so a new #define, LONG_LONG, has been added and all occurrences
of 'long long' are replaced with it.
1998-08-25 16:07:15 +00:00
Guido van Rossum f1536db2e7 Move an indented #define to column 1. 1998-08-23 22:06:59 +00:00
Guido van Rossum 3d109a0e6d Add missing prototypes for PyEval_CallFunction() and PyEval_CallMethod(). 1998-08-08 20:53:36 +00:00
Guido van Rossum b2395ebd51 Upgrade patchlevel to 1.5.2a1. 1998-08-05 21:16:18 +00:00
Guido van Rossum 1a8791e0b8 Changes for BeOS, QNX and long long, by Chris Herborth. 1998-08-04 22:46:29 +00:00
Barry Warsaw 62a21a2ebe New global variables: PyExc_EnvironmentError and PyExc_OSError
New function: PyErr_SetFromErrnoWithFilename(PyObject* char*)
1998-07-23 15:57:34 +00:00
Guido van Rossum ba0d0611e7 Add macros for direct access to the members of CFunction objects. 1998-07-10 15:47:08 +00:00
Guido van Rossum d4ba73c75b Move the definition of PyMethodObject to classobject.h, so it can define
macros for more efficient access to the fields.
1998-07-10 15:46:33 +00:00
Guido van Rossum 9223351617 Marc-Andre Lemburg's patch to move the typedef for PyCFunctionObject
to the .h file and add macros there for inlined access to the fields.
1998-07-10 15:21:55 +00:00
Guido van Rossum 9d865e1a30 Get rid of some obsolete opcodes. 1998-07-07 14:58:39 +00:00
Guido van Rossum 16926bd75e Add PyImport_AppendInittab() an PyImport_ExtendInittab(). 1998-06-29 20:34:46 +00:00
Guido van Rossum a70d160095 Define new macro Py_InitModule3(name, methods, doc) which calls
Py_InitModule4() with appropriate arguments.
1998-06-27 18:21:59 +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 44e4d5a6fd Renamed PySequence_In() to PySequence_Contains(). 1998-05-22 00:47:25 +00:00
Guido van Rossum bf6a9b165a Add
PySys_WriteStdout(format, ...)
   PySys_WriteStderr(format, ...)
1998-05-12 14:58:52 +00:00
Guido van Rossum 50cc04ee03 Mac CodeWarrior has faulty declaration for hypot, which we hide with a
#define.
(Jack)
1998-04-28 16:02:29 +00:00
Guido van Rossum a937d14898 Fred's right -- we need PyList_SET_ITEM(). 1998-04-24 18:22:02 +00:00
Guido van Rossum a9c2d7a87c Add new spares to the end of the type object struct. 1998-04-23 19:16:44 +00:00
Guido van Rossum ee0a63bec5 Move 'dict' struct member to end of struct. This ensures binary
compatibility for shared libraries.

*** WARNING -- IF YOU BUILT 1.5.1BETA1, DO A "MAKE CLEAN" ***
1998-04-13 20:24:05 +00:00
Guido van Rossum 26d4ac30be Add prototypes for Py_Repr{Enter,Leave}.
(Jeremy will hardly recognize his patch :-)
1998-04-10 22:32:24 +00:00
Guido van Rossum 204751b127 Add dict struct member and PyThreadState_GetDict() prototype. 1998-04-10 20:19:01 +00:00
Guido van Rossum c9ea7572e9 Set the patch level to 1.5.1. (I'm not going to release this as a
beta -- if there are bugs, I'll post a patch page and release 1.5.2
sooner.)
1998-04-10 18:08:06 +00:00
Guido van Rossum 4d856ee652 Added Tabcheck flag. 1998-04-10 17:59:44 +00:00
Guido van Rossum e77a992a0d Add E_INDENT -- new error to check for bad indentation 1998-04-09 21:37:20 +00:00
Guido van Rossum c3d3f9692d Add PyObject_Not(). 1998-04-09 17:53:59 +00:00
Guido van Rossum f1dc0615e9 Add internal routine _PyModule_Clear(), which does approximately what
clear_carefully() used to do in import.c.  Differences: leave only
__builtins__ alone in the 2nd pass; and don't clear the dictionary (on
the theory that as long as there are references left to the
dictionary, those might be destructors that might expect __builtins__
to be alive when they run; and __builtins__ can't normally be part of
a cycle).
1998-02-19 20:51:52 +00:00
Guido van Rossum fccb68ef2a Added PyImport_ExecCodeModuleEx(), which adds an extra parameter to pass
it the true file.
1998-02-11 05:47:24 +00:00
Guido van Rossum 66d4b90791 - Add Py_GetPythonHome() and Py_SetPythonHome(), intended to allow
embedders to force a different PYTHONHOME.

- Add new interface PyErr_PrintEx(flag); same as PyErr_Print() but
flag determines whether sys.last_* are set or not.  PyErr_Print()
now simply calls PyErr_PrintEx(1).
1998-02-06 22:28:05 +00:00