| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
| |
Fix a bunch of refleaks in the init of the module. This would only be found
when running python -v.
|
|
|
|
|
|
|
| |
I modified this patch some by fixing style, some error checking, and adding
XXX comments. This patch requires review and some changes are to be expected.
I'm checking in now to get the greatest possible review and establish a
baseline for moving forward. I don't want this to hold up release if possible.
|
|
|
|
|
|
| |
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
|
|
|
|
| |
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
|
| |
|
|
|
|
|
|
| |
This was mostly written by Travis Oliphant.
I've inspected it all; Neal Norwitz and MvL have also looked at it
(in an earlier incarnation).
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
mixing signed and unsigned types in comparison.
|
|
|
|
| |
in function calls.
|
|
|
|
| |
deleted some curlies around one-line blocks.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On a box where sizeof(size_t) == 4, C doesn't define
what happens when a size_t value is shifted right by
32 bits, and this caused test_mmap to fail on Windows
in a debug build. So use different code to break
the size apart depending on how large size_t actually
is.
This looks like an illusion, since lots of code in this
module still appears to assume sizes can't be more
than 32 bits (e.g., the internal _GetMapSize() still
returns an int), but at least test_mmap passes again.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
on both Unix (SVR4 and BSD) and Windows. Restores behaviour of passing -1
for anonymous memory on Unix. Use MAP_ANONYMOUS instead of _ANON since
the latter is deprecated according to Linux (gentoo) man pages.
Should we continue to allow mmap.mmap(0, length) to work on Windows?
0 is a valid fd.
Will backport bugfix portions.
|
| |
|
|
|
|
| |
Probably should be backported.
|
|
|
|
|
|
|
| |
This didn't crash on Linux, but valgrind complained.
I'm not sure if this test is valid on Windows.
Will backport.
|
|
|
|
| |
Fix some 64-bit issues due to mismatch format characters w/actual data types
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In C++, it's an error to pass a string literal to a char* function
without a const_cast(). Rather than require every C++ extension
module to put a cast around string literals, fix the API to state the
const-ness.
I focused on parts of the API where people usually pass literals:
PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type
slots, etc. Predictably, there were a large set of functions that
needed to be fixed as a result of these changes. The most pervasive
change was to make the keyword args list passed to
PyArg_ParseTupleAndKewords() to be a const char *kwlist[].
One cast was required as a result of the changes: A type object
mallocs the memory for its tp_doc slot and later frees it.
PyTypeObject says that tp_doc is const char *; but if the type was
created by type_new(), we know it is safe to cast to char *.
|
|
|
|
|
| |
Close the fd in the close method and invalidated it. Don't try
to close a second time when deallocating.
|
| |
|
| |
|
| |
|
|
|
|
| |
file size.
|
|
|
|
|
|
| |
function from trying to do msync(-1);munmap(-1).
2.3 bugfix candidate, but this bug isn't critical enough that the fix has to go into 2.3.4
|
|
|
|
| |
Remove BAD_EXEC_PROTOYPE (leftover from IRIX 4 demolition).
|
|
|
|
| |
file, not a character or block device.
|
| |
|
|
|
|
|
| |
- CHECK_VALID() was checking the wrong value for a closed fd
- fseek(&_iob[fileno], ...) doesn't work for fileno >= 20
|
|
|
|
|
|
|
| |
Make length an int so we get the right value from
PyArg_ParseTuple(args, "s#", &str, &length)
Will backport.
|
|
|
|
|
|
| |
Closing an mmap'ed file (calling munmap) twice on Solaris caused a core dump.
Will backport.
|
|
|
|
|
| |
Raise ValueError if user passes a size to mmap which is larger
than the file.
|
|
|
|
|
| |
command line for Windows builds. This should allow MSVC to import and
build the Python MSVC6 project files without error.
|
|
|
|
| |
Rename all occurrences of MS_WIN32 to MS_WINDOWS.
|
|
|
|
|
|
|
|
|
| |
mmap_find_method(): this obtained the string to find via s#, but it
ignored its length, acting as if it were \0-terminated instead.
Someone please run on Linux too (the extended test_mmap works on Windows).
Bugfix candidate.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type.__module__ behavior.
This adds the module name and a dot in front of the type name in every
type object initializer, except for built-in types (and those that
already had this). Note that it touches lots of Mac modules -- I have
no way to test these but the changes look right. Apologies if they're
not. This also touches the weakref docs, which contains a sample type
object initializer. It also touches the mmap test output, because the
mmap type's repr is included in that output. It touches object.h to
put the correct description in a comment.
|
|
|
|
|
|
|
|
|
|
| |
This gives mmap() on Windows the ability to create read-only, write-
through and copy-on-write mmaps. A new keyword argument is introduced
because the mmap() signatures diverged between Windows and Unix, so
while they (now) both support this functionality, there wasn't a way to
spell it in a common way without introducing a new spelling gimmick.
The old spellings are still accepted, so there isn't a backward-
compatibility issue here.
|
| |
|