Commit Graph

437 Commits

Author SHA1 Message Date
Fred Drake 0e12bcd243 Updated comment: in PyTypeObject:
/* More standard operations (at end for binary compatibility) */

should now be:

	/* More standard operations (here for binary compatibility) */

since they're no longer at the end!
2000-03-21 16:14:47 +00:00
Barry Warsaw 51ac58039f On 17-Mar-2000, Marc-Andre Lemburg said:
Attached you find an update of the Unicode implementation.

    The patch is against the current CVS version. I would appreciate
    if someone with CVS checkin permissions could check the changes
    in.

    The patch contains all bugs and patches sent this week and also
    fixes a leak in the codecs code and a bug in the free list code
    for Unicode objects (which only shows up when compiling Python
    with Py_DEBUG; thanks to MarkH for spotting this one).
2000-03-20 16:36:48 +00:00
Guido van Rossum d0d366b5e6 Marc-Andre Lemburg: add declaration for PyUnicode_Contains(). 2000-03-13 23:22:24 +00:00
Guido van Rossum d724b23420 Christian Tismer's "trashcan" patch:
Added wrapping macros to dictobject.c, listobject.c, tupleobject.c,
frameobject.c, traceback.c that safely prevends core dumps
on stack overflow. Macros and functions in object.c, object.h.
The method is an "elevator destructor" that turns cascading
deletes into tail recursive behavior when some limit is hit.
2000-03-13 16:01:29 +00:00
Guido van Rossum fd9eed33aa Marc-Andre Lemburg: added declarations for PyObject_AsCharBuffer,
PyObject_AsReadBuffer, PyObject_AsWriteBuffer.
2000-03-10 22:35:06 +00:00
Guido van Rossum bd7dfbc146 Marc-Andre Lemburg: include unicodeobject.h and codecs.h 2000-03-10 22:34:00 +00:00
Guido van Rossum 99cc97109e Marc-Andre Lemburg: add PyExc_UnicodeError 2000-03-10 22:33:32 +00:00
Guido van Rossum d822518fa8 Unicode implementation by Marc-Andre Lemburg based on original code by Fredrik Lundh. 2000-03-10 22:33:05 +00:00
Guido van Rossum 3094484106 Python Codec Registry and support functions, by Marc-Andre Lemburg. 2000-03-10 22:32:23 +00:00
Guido van Rossum c6e87a2925 Got rid of silly "123456789-..." lines in comments. 2000-03-01 15:06:53 +00:00
Guido van Rossum cecb27a49c Patch by Mozhe Zadka, for __contains__ (overloading 'in'). This adds
a new proc type (objobjproc), a new slot sq_contains to
PySequenceMethods, and a new flag Py_TPFLAGS_HAVE_SEQUENCE_IN to
Py_TPFLAGS_DEFAULT.  More to follow.
2000-02-28 15:00:40 +00:00
Guido van Rossum db0c9f7f5b Declarations related to new WindowsError exception. 2000-02-17 15:17:18 +00:00
Guido van Rossum bffd683f73 The rest of the changes by Trent Mick and Dale Nagata for warning-free
compilation on NT Alpha.  Mostly added casts etc.
2000-01-20 22:32:56 +00:00
Barry Warsaw 226ae6ca12 Mainlining the string_methods branch. See branch revision log
messages for specific changes.
1999-10-12 19:54:53 +00:00
Guido van Rossum 8746082175 Patch by Tim Peters:
Introduce a new builtin exception, UnboundLocalError, raised when ceval.c
tries to retrieve or delete a local name that isn't bound to a value.
Currently raises NameError, which makes this behavior a FAQ since the same
error is raised for "missing" global names too:  when the user has a global
of the same name as the unbound local, NameError makes no sense to them.
Even in the absence of shadowing, knowing whether a bogus name is local or
global is a real aid to quick understanding.

Example:

D:\src\PCbuild>type local.py
x = 42

def f():
    print x
    x = 13
    return x

f()

D:\src\PCbuild>python local.py
Traceback (innermost last):
  File "local.py", line 8, in ?
    f()
  File "local.py", line 4, in f
    print x
UnboundLocalError: x

D:\src\PCbuild>

Note that UnboundLocalError is a subclass of NameError, for compatibility
with existing class-exception code that may be trying to catch this as a
NameError.  Unfortunately, I see no way to make this wholly compatible
with -X (see comments in bltinmodule.c):  under -X, [UnboundLocalError
is an alias for NameError --GvR].

[The ceval.c patch differs slightly from the second version that Tim
submitted; I decided not to raise UnboundLocalError for DELETE_NAME,
only for DELETE_LOCAL.  DELETE_NAME is only generated at the module
level, and since at that level a NameError is raised for referencing
an undefined name, it should also be raised for deleting one.]
1999-06-22 14:47:32 +00:00
Guido van Rossum 8f3e15058c Set PATCHLEVEL and PY_VERSION (string version only) to 1.5.2+ to
indicate to those that are using the CVS access that they are using a
newer-than-1.2.5 version, without committing to a particular version
number or patch level.
1999-06-09 15:16:18 +00:00
Guido van Rossum 9e47859963 Prepare for final release. 1999-04-13 14:47:26 +00:00
Guido van Rossum 6d0de99d8d Release 1.5.2c1 1999-04-08 20:23:44 +00:00
Guido van Rossum bd341fa82a Add the possibility of a gamma release (release candidate).
Add '+' to string version number to indicate we're beyond b2 now.
1999-04-07 16:00:20 +00:00
Guido van Rossum d023a78f59 Conform to standard boilerplate. 1999-03-24 19:02:09 +00:00
Guido van Rossum d709b48706 Adding thread.h -- unused but for b/w compatibility.
As requested by Bill Janssen.
1999-03-22 22:25:39 +00:00
Guido van Rossum 8368453249 Add DLL level b/w compat for PySequence_In and PyEval_CallObject 1999-03-17 18:44:39 +00:00
Guido van Rossum e784f1efec Add PyModule_GetFilename(). 1999-02-15 14:43:11 +00:00
Guido van Rossum 7999bfb235 There's a macro PycString_IMPORT which the documentation listed as
PycStringIO_IMPORT.  While arguably the name used in the documentation
is more consistent, I think it's probably safer not to change the
macro definition and instead fix the doco.
1999-01-25 21:36:13 +00:00
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