| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Finally, this long-obsolete module bites the dust.
|
|
|
|
|
| |
Change Py_Malloc/Realloc/Free calls to PyMem_Malloc/Realloc/Free +
PyErr_Nomemory on error check. Py_Malloc c.s. are obsolete.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checkin 2.131 of posixmodule.c changed os.stat on Windows, so that
"/bin/" type notation (trailing backslash) would work on Windows to
be consistent with Unix.
However, the patch broke the simple case of: os.stat("\\")
This did work in 1.5.2, and obviously should!
This patch addresses this, and restores the correct behaviour.
|
|
|
|
|
| |
don't think that's what we want. There was some brief discussion
of this somewhere but I don't recall where.
|
|
|
|
| |
Py_Main(): Remove the 'X' case.
|
| |
|
|
|
|
|
|
|
| |
Added -U command line option.
With the option enabled the Python compiler interprets all "..."
strings as u"..." (same with r"..." and ur"...").
|
|
|
|
|
|
| |
utime(path, NULL) call, setting the atime and mtime of the file to the
current time. The previous signature utime(path, (atime, mtime)) is
of course still allowed.
|
|
|
|
| |
Fixes a memory leak found by Fredrik Lundh.
|
|
|
|
|
|
|
|
| |
This patch is a workaround for Macintosh, where the GUSI I/O library
(time, stat, etc) use the MacOS epoch of 1-Jan-1904 and the MSL C
library (ctime, localtime, etc) uses the (apparently ANSI standard)
epoch of 1-Jan-1900. Python programs see the MacOS epoch and we
convert values when needed.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes posixmodule.c:execv to
a) check for zero length args (does this to execve, too), raising
ValueError.
b) raises more rational exceptions for various flavours of duff arguments.
I *hate*
TypeError: "illegal argument type for built-in operation"
It has to be one of the most frustrating error messages ever.
|
|
|
|
| |
MSG_DONTWAIT. Reported by Fredrik Lundh.
|
|
|
|
|
| |
1) Adds MSG_DONTWAIT if defined (I needed this)
2) Spells "coreectly" correctly ;-)
|
|
|
|
| |
you are trying to use Py_TRACE_REFS.
|
|
|
|
|
| |
validate_numnodes(): Added comment to explain the sometimes idiomatic
usage pattern.
|
|
|
|
|
|
|
|
|
|
| |
socklen_t (unsigned int) for most size parameters. Apparently this is
part of the UNIX 98 standard.
[GvR: the changes to configure.in etc. that I just checked in make
sure that socklen_t is defined everywhere, so I deleted the little
part of Jack's mod to define socklen_t if not in GUSI2. I suppose I
will have to add it to the Windows config.h in a minute.]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"""
Problem description:
Run the following script:
import test.test_cpickle
for x in xrange(1000000):
reload(test.test_cpickle)
Watch Python's memory use go up up and away!
In the course of debugging this I also saw that cPickle is
inconsistent with pickle - if you attempt a pickle.load or pickle.dump
on a closed file, you get a ValueError, whereas the corresponding
cPickle operations give an IOError. Since cPickle is advertised as
being compatible with pickle, I changed these exceptions to match.
"""
|
|
|
|
|
|
|
|
|
| |
Windows), soclose (on OS2), or to close (everywhere else).
Hopefully this fixes a new compilation error that I suddenly get on
Windows because the macro definition for close -> closesocket
apparently was done before including io.h, which contains a prototype
for close. (No idea why this wasn't an error before.)
|
|
|
|
|
|
|
|
|
|
| |
backslash from the pathname argument to stat() on Windows -- while on
Unix, stat("/bin/") succeeds and does the same thing as stat("/bin"),
on Windows, stat("\\windows\\") fails while stat("\\windows") succeeds.
This modified version of the patch recognizes both / and \.
(This is odd behavior of the MS C library, since
os.listdir("\\windows\\") succeeds!)
|
|
|
|
| |
(4-space indents already used.)
|
|
|
|
| |
inserted dictionary values. Also, simplified the logic a bit.
|
| |
|
| |
|
|
|
|
| |
IRIX, it doesn't even compile. Added a cast: "where >= (char *)0".
|
|
|
|
| |
Fredrik Lundh: add two missing casts.
|
|
|
|
| |
to prevent possible buffer overruns.
|
| |
|
|
|
|
| |
(Mark Hammond.)
|
|
|
|
| |
This patch fixes the mmap module on Windows 9x.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
backwards compatibility, and to avoid a revolution.
|
|
|
|
|
| |
pages of 4k entries each. This should fix compiler problems on some
platforms.
|
|
|
|
|
|
| |
"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).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
NOTE: THIS IS VERY ROUGH ALPHA CODE!
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
in scope on systems where mode_t isn't the same size as int...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
(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).
|
| |
|
|
|
|
| |
Careful, this has had zero testing (except by Peter)!
|