| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
array.__deepcopy__() needs to take an argument, even if it doesn't actually
use it. Will backport to 2.5 and 2.4 (if applicable.)
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
This is the first batch of fixes that should be easy to verify based on context.
This fixes problem numbers: 220 (ast), 323-324 (symtable),
321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).
|
|
|
|
|
|
| |
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
|
|
|
|
|
|
|
|
|
| |
the char buffer was requested. Now it actually returns the char buffer if
available or raises a TypeError if it isn't (as is raised for the other buffer
types if they are not present but requested).
Not a backport candidate since it does change semantics of the buffer object
(although it could be argued this is enough of a bug to bother backporting).
|
|
|
|
|
|
|
|
|
|
| |
* Added socket.recv_buf() and socket.recvfrom_buf() methods, that use the buffer
protocol (send and sendto already did).
* Added struct.pack_to(), that is the corresponding buffer compatible method to
unpack_from().
* Fixed minor typos in arraymodule.
|
|
|
|
| |
under C++ though...
|
|
|
|
|
|
|
|
| |
using a custom, nearly-identical macro. This probably changes how some of
these functions are compiled, which may result in fractionally slower (or
faster) execution. Considering the nature of traversal, visiting much of the
address space in unpredictable patterns, I'd argue the code readability and
maintainability is well worth it ;P
|
| |
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
(reviewed by Neal Norwitz)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Probably should be backported.
|
|
|
|
| |
(fixes bug #1119418)
|
| |
|
|
|
|
| |
Made the constructor accept general iterables.
|
| |
|
|
|
|
|
|
|
| |
array.extend() now accepts iterable arguments implements as a series
of appends. Besides being a user convenience and matching the behavior
for lists, this the saves memory and cycles that would be used to
create a temporary array object.
|
|
|
|
|
|
|
|
| |
lists. Speeds append() operations and reduces memory requirements
(because of more conservative overallocation).
Paves the way for the feature request for array.extend() to support
arbitrary iterable arguments.
|
|
|
|
| |
Added support for the copy module.
|
|
|
|
|
|
| |
* Py_BuildValue("(OOO)",a,b,c) --> PyTuple_Pack(3,a,b,c)
* Py_BuildValue("()",a) --> PyTuple_New(0)
* Py_BuildValue("O", a) --> Py_INCREF(a)
|
|
|
|
|
|
|
|
| |
Fixed leak caused by switching from PyList_GetItem to PySequence_GetItem.
Added missing NULL check.
Clarified code by converting an "if" to an "else if".
Will backport to 2.3.
|
|
|
|
|
| |
over the size of the array, or the callers check the index bounds themselves,
so the index check never failed => Replace it with an assert().
|
|
|
|
|
| |
being relative to the end of the array, just like list.insert() does.
This closes SF bug #739313.
|
|
|
|
| |
Allows use of tuples for the initializer.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(contributed by logistix; substantially reworked by rhettinger).
To create a representation of non-string arrays, array_repr() was
starting with a base Python string object and repeatedly using +=
to concatenate the representation of individual objects.
Logistix had the idea to convert to an intermediate tuple form and
then join it all at once. I took advantage of existing tools and
formed a list with array_tolist() and got its representation through
PyObject_Repr(v) which already has a fast implementation for lists.
|
|
|
|
|
|
| |
to more accurately describe what the function does.
Suggested by Thomas Wouters.
|
|
|
|
| |
Factors out the common case of returning self.
|
|
|
|
| |
This improves speed by about 5.6% for me.
|
|
|
|
|
| |
The attached patch enables the array module
to build cleanly under Cygwin again.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The attached patch enables shared extension
modules to build cleanly under Cygwin without
moving the static initialization of certain function
pointers (i.e., ones exported from the Python
DLL core) to a module initialization function.
Additionally, this patch fixes the modules that
have been changed in the past to accommodate
Cygwin.
|
|
|
|
|
| |
Simplify code and speed access by using PyArg_UnpackTuple, METH_O and
METH_NOARGS in three modules that can benefit from it.
|
|
|
|
|
|
| |
for Py_Main().
Thanks to Kalle Svensson and Skip Montanaro for the patches.
|
|
|
|
|
|
| |
[ 587875 ] crash on deleting extended slice
The array code got simpler, always a good thing!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The staticforward define was needed to support certain broken C
compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
static keyword when it was used with a forward declaration of a static
initialized structure. Standard C allows the forward declaration with
static, and we've decided to stop catering to broken C compilers. (In
fact, we expect that the compilers are all fixed eight years later.)
I'm leaving staticforward and statichere defined in object.h as
static. This is only for backwards compatibility with C extensions
that might still use it.
XXX I haven't updated the documentation.
|
|
|
|
|
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2002-June/025461.html
with test cases.
Also includes extended slice support for arrays, which I thought I'd
already checked in but obviously not.
|
| |
|
|
|
|
|
| |
I have a patch to make the test work too, but it's not pretty so
I'll submit it to sf.
|
| |
|
| |
|
| |
|
|
|
|
| |
directly.
|
| |
|
|
|
|
|
|
| |
- make array.array a type
- add Py_UNICODE arrays
- support +=, *=
|