| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2008-June/079988.html
Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names
in the spirit of 3.0 are available via a #define only. See the email thread.
|
| | |
|
| |
|
|
| |
a subclass of it. Thanks John Lenton.
|
| |
|
|
| |
Thanks to Thomas Herve for the fix.
|
| |
|
|
| |
It's system dependent. This might fix the problem with test_rfind failing.
|
| |
|
|
| |
nor UNIX is defined. This may have caused problems on cygwin.
|
| |
|
|
| |
this might fix the problem.
|
| | |
|
| | |
|
| |
|
|
| |
factory function. Allow it to be subclassed.
|
| |
|
|
|
|
| |
access.
Fixes #1087735.
|
| |
|
|
| |
Contributed by John Lenton.
|
| | |
|
| |
|
|
| |
Py_REFCNT. Macros for b/w compatibility are available.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Specialcase extended slices that amount to a shallow copy the same way as
is done for simple slices, in the tuple, string and unicode case.
- Specialcase step-1 extended slices to optimize the common case for all
involved types.
- For lists, allow extended slice assignment of differing lengths as long
as the step is 1. (Previously, 'l[:2:1] = []' failed even though
'l[:2] = []' and 'l[:2:None] = []' do not.)
- Implement extended slicing for buffer, array, structseq, mmap and
UserString.UserString.
- Implement slice-object support (but not non-step-1 slice assignment) for
UserString.MutableString.
- Add tests for all new functionality.
|
| |
|
|
|
| |
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
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.
|