Commit Graph

1438 Commits

Author SHA1 Message Date
Fred Drake ff9ea480eb ANSI-fy & de-tabify the source.
(4-space indents already used.)
2000-04-19 13:54:15 +00:00
Barry Warsaw 3155db3b79 setup_confname_table(): Close memory leak caused by not decref'ing the
inserted dictionary values.  Also, simplified the logic a bit.
2000-04-13 15:20:40 +00:00
Jeremy Hylton 127b2ef2d5 raise TypeError when bad argument passed to cStringIO.StringIO 2000-04-12 22:04:01 +00:00
Guido van Rossum 36d4f8b0ec Correct fix by Mark Favas for the cast problems. 2000-04-10 21:34:37 +00:00
Guido van Rossum e110dcfa86 I've had complaints about the comparison "where >= 0" before -- on
IRIX, it doesn't even compile.  Added a cast: "where >= (char *)0".
2000-04-10 21:14:05 +00:00
Guido van Rossum 29530886af Remove CRLF line endings.
Fredrik Lundh: add two missing casts.
2000-04-10 17:06:55 +00:00
Guido van Rossum 5db862dd0c Skip Montanaro: add string precisions to calls to PyErr_Format
to prevent possible buffer overruns.
2000-04-10 12:46:51 +00:00
Guido van Rossum fa972c987c In dealloc(), only close the socket if fd != -1. 2000-04-10 12:45:45 +00:00
Guido van Rossum 54b1c0b408 Windows: Since we're not using ZLIB.DLL any more, don't define ZLIB_DLL.
(Mark Hammond.)
2000-04-06 13:20:38 +00:00
Fred Drake 1ef4e2d54e Mark Hammond <mhammond@skippinet.com.au>:
This patch fixes the mmap module on Windows 9x.
2000-04-05 14:15:31 +00:00
Fred Drake 56a87a0905 Patch from Hrvoje Niksic <hniksic@iskon.hr>:
The bug is in mmap_read_line_method(), and its loop that searches for
newlines.  After the loop reaches EOF, eol is incremented and points
after the end of the memory.  This results in readline() method
sometimes picking up and returning a byte after the end of the string.
This is usually a bogus \0, but it could cause SIGSEGV if it's after
the end of the page).

The patch fixes the problem.  Also, it uses memchr() for finding a
character, which is in fact the "strnchr" the comment is asking for.
memchr() is already used in Python sources, so there should be no
portability problems.
2000-04-04 18:17:35 +00:00
Guido van Rossum b49dc75f51 Add warning that multi-arg connect() etc. are deprecated. 2000-04-04 15:09:07 +00:00
Guido van Rossum 527c9bd32a Put back multi-arg capability on connect/connect_ex/bind, for
backwards compatibility, and to avoid a revolution.
2000-04-04 14:10:20 +00:00
Guido van Rossum 8a16054240 Marc-Andre Lemburg: The large unicode database table is broken in
pages of 4k entries each. This should fix compiler problems on some
platforms.
2000-03-31 17:26:12 +00:00
Andrew M. Kuchling 52a644cbda Add '#include <netinet/tcp.h>'
"man tcp" on Solaris says that TCP_NODELAY is defined in
netinet/tcp.h, and the Open Groups Unix98 spec agrees
(http://www.opengroup.org/onlinepubs/009619199/ninettcp.htm).
2000-03-31 17:24:30 +00:00
Guido van Rossum 8de16932d0 This module's name should be linuxaudio*dev*.c 2000-03-31 16:56:32 +00:00
Guido van Rossum d1bda0ce88 Added some clarifications to pyexpat. 2000-03-31 16:39:02 +00:00
Guido van Rossum 5961f5a06d Make it compile on Windows. 2000-03-31 16:18:11 +00:00
Andrew M. Kuchling b7f105371f Added Python interface to Expat XML parser.
The Setup.in entry is sort of a lie; it links with -lexpat, but
    Expat's Makefile doesn't actually build a libexpat.a.  I'll send
    Expat's author a patch to do that; if he doesn't accept it, this
    rule will have to list Expat's object files (ick!), or have a
    comment explaining how to build a .a file.
2000-03-31 15:43:31 +00:00
Guido van Rossum 325942adb4 Removed three unused variables from the Windows code. 2000-03-31 15:04:26 +00:00
Guido van Rossum e56793557c Added the _sre module. It is always on. 2000-03-31 15:01:27 +00:00
Guido van Rossum b700df9824 Adding Fredrik Lundh's _sre.c module and its header files.
NOTE: THIS IS VERY ROUGH ALPHA CODE!
2000-03-31 14:59:30 +00:00
Guido van Rossum 64231e5c39 Add back an obscure "feature" to the Obj version of Tkapp_Call(): a
None in an argument list *terminates* the argument list: further
arguments are *ignored*.  This isn't kosher, but too much code relies
on it, implicitly.  For example, IDLE was pretty broken.
2000-03-31 03:29:39 +00:00
Guido van Rossum ef40e77ac5 Sigh. On Windows, (mode_t)i fails. Assume that there's a prototype
in scope on systems where mode_t isn't the same size as int...
2000-03-31 01:26:23 +00:00
Guido van Rossum 09fdf07315 Hacked for Win32 by Mark Hammond.
Reformatted for 8-space tabs and fitted into 80-char lines by GvR.

Mark writes:

* the Win32 version now accepts the same args as the Unix version.
The win32 specific "tag" param is now optional.  The end result is
that the exact same test suite runs on Windows (definately a worthy
goal!).

* I changed the error object.  All occurences of the error, except
for 1, corresponds to an underlying OS error.  This one was changed
to a ValueError (a better error for that condition), and the module
error object is now simply EnvironmentError.  All win32 error
routines now call the new Windows specific error handler.
2000-03-31 01:17:07 +00:00
Guido van Rossum a1f0a8f4a4 Don't use the object call interface in Tk 8.0 -- the EvalObj* API
changed from 8.0 to 8.1 and I see no big reason to use objects in 8.0.
At least now it works again with all versions from 8.0 - 8.3.
2000-03-31 00:51:37 +00:00
Guido van Rossum 49679b40b9 Oops, the previous patch contained a bug in chmod. Fixed now. 2000-03-31 00:48:21 +00:00
Guido van Rossum ffd15f5255 Two robustness patches:
(1) In opendir(), don't call the lock-release macros; we're
manipulating list objects and that shouldn't be done in unlocked
state.

(2) Don't use posix_strint() for chmod() -- the mode_t arg might be a
64 bit int (reported by Nick Maclaren).
2000-03-31 00:47:28 +00:00
Guido van Rossum aaf0ab26ed Add linuxaudio module. 2000-03-30 23:27:44 +00:00
Guido van Rossum b130dc7419 Audio module for Linux, contributed by Peter Bosch.
Careful, this has had zero testing (except by Peter)!
2000-03-30 23:25:49 +00:00
Andrew M. Kuchling 1ed7d2d2b8 Added mmap module -- map a view of a file into memory on Win32 and Unix.
(Needs testing on Win32.)
2000-03-30 21:14:30 +00:00
Guido van Rossum 632de27021 The Tcl_Obj patch discussed on the patches list.
This was originally submitted by Martin von Loewis as part of his
Unicode patch; all I did was add special cases for Python int and
float objects and rearrange the object type tests somewhat to speed up
the common cases (string, int, float, tuple, unicode, object).
2000-03-29 00:19:50 +00:00
Guido van Rossum 24bdb0474f Marc-Andre Lemburg:
The attached patch set includes a workaround to get Python with
Unicode compile on BSDI 4.x (courtesy Thomas Wouters; the cause
is a bug in the BSDI wchar.h header file) and Python interfaces
for the MBCS codec donated by Mark Hammond.

Also included are some minor corrections w/r to the docs of
the new "es" and "es#" parser markers (use PyMem_Free() instead
of free(); thanks to Mark Hammond for finding these).

The unicodedata tests are now in a separate file
(test_unicodedata.py) to avoid problems if the module cannot
be found.
2000-03-28 20:29:59 +00:00
Guido van Rossum a80649b357 Patch by Neil Schemenauer to remove support for Tcl/Tk versions before
8.0.  There really is no excuse, and for who really still wants those,
they can go back to Python 1.5.2.
2000-03-28 20:07:05 +00:00
Guido van Rossum e187b0eb20 Add a call to Tcl_FindExecutable(). This was inspired by a patch by
Martin von Loewis (whose more elaborate patch to use objects is still
under review).
2000-03-27 21:46:29 +00:00
Guido van Rossum 27fc3c05e1 Fix all routines to use PyArg_ParseTuple(), and add ":name" to the
argument format strings.

THIS WILL PROBABLY BREAK LOTS OF CODE!!!

Also fixed a bogus string in an error message in getsockaddrlen().
2000-03-24 20:56:56 +00:00
Andrew M. Kuchling c24ca4b192 Fix probable bug; if errno == EINTR, floatsleep() doesn't break out of
a Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS block, but it
   calls Py_BLOCK_THREADS anyway. The change moves Py_BLOCK_THREADS
   to inside the if, so it's only executed when the function
   actually returns unexpectedly.
2000-03-24 20:35:20 +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
Jeremy Hylton 7ceab65468 Fix bogus error reporting on strptime: let PyArg_ParseTuple set exception.
Also, wrap long line.
2000-03-14 21:17:16 +00:00
Guido van Rossum e141fd84e9 Marc-Andre Lemburg: add new Unicode-related files. 2000-03-10 23:12:33 +00:00
Guido van Rossum c7de91bf9c Marc-Andre Lemburg: Add _codecs and unicodedata modules. 2000-03-10 23:12:08 +00:00
Guido van Rossum 5fccb7c58e Marc-Andre Lemburg: support pickling Unicode objects, both in text
mode ('V') and in binary mode ('X').
2000-03-10 23:11:40 +00:00
Guido van Rossum 2a70a3a8fc Module unicodedata -- Provides access to the Unicode 3.0 data base.
Written by Marc-Andre Lemburg.
2000-03-10 23:10:21 +00:00
Guido van Rossum e2d67f98d1 Internal module _codecs -- Provides access to the codec registry and
the builtin codecs.  Written by Marc-Andre Lemburg.
2000-03-10 23:09:23 +00:00
Guido van Rossum 5bfc2eb697 Marc-Andre-Lemburg: The Unicode Database. 2000-03-10 23:08:04 +00:00
Fred Drake e066134f48 Fixed inet_ntoa() docstring. 2000-03-07 14:05:16 +00:00
Greg Ward b48bc17d10 Second attempt to fix the ctermid_r/tmpnam_r warnings: define USE_CTERMID_R
and USE_TMPNAM_R at the top of the file and refer to them later; this
catches a second reference to 'tmpnam_r' that I didn't spot first time around.
2000-03-01 21:51:56 +00:00
Greg Ward 9217fcbb38 Fix compiler warning: only use "_r" form of 'ctermid()' and 'tmpnam()' when
building a threaded Python.
2000-03-01 18:59:47 +00:00
Guido van Rossum 61b705a570 Patch by Fred Gansevles (the module's original author).
This patch fixes 3 small problems.
1) If a map is used which is generated with 'makedbm -a',
   the trailing '\0' is now handled correctely.
2) The nis.maps() function skipped the first map in the output list.
3) The library '-lnsl' is added in Setup.in (needed on Linux glibc2 and
   Solaris systems. Maybe on other systems too?)

[I note that this still doesn't work when you are using NIS+ --GvR]
2000-02-29 15:52:40 +00:00
Guido van Rossum 43713e5a28 Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
2000-02-29 13:59:29 +00:00