]> granicus.if.org Git - python/log
python
18 years agoClarify docs for str.partition().
Georg Brandl [Fri, 26 May 2006 09:05:54 +0000 (09:05 +0000)]
Clarify docs for str.partition().

18 years agoneedforspeed: partition implementation, part two.
Fredrik Lundh [Fri, 26 May 2006 08:54:28 +0000 (08:54 +0000)]
needforspeed: partition implementation, part two.

feel free to improve the documentation and the docstrings.

18 years agoWithout this patch OSX users couldn't add new help sources because the code
Ronald Oussoren [Fri, 26 May 2006 08:41:25 +0000 (08:41 +0000)]
Without this patch OSX users couldn't add new help sources because the code
tried to update one item in a tuple.

18 years agoAdd Soc student
Andrew M. Kuchling [Fri, 26 May 2006 01:46:22 +0000 (01:46 +0000)]
Add Soc student

18 years agoneedforspeed: partition for 8-bit strings. for some simple tests,
Fredrik Lundh [Thu, 25 May 2006 23:27:53 +0000 (23:27 +0000)]
needforspeed: partition for 8-bit strings.  for some simple tests,
this is on par with a corresponding find, and nearly twice as fast
as split(sep, 1)

full tests, a unicode version, and documentation will follow to-
morrow.

18 years agoPatch #1494387: SVN longobject.c compiler warnings
Tim Peters [Thu, 25 May 2006 22:28:46 +0000 (22:28 +0000)]
Patch #1494387: SVN longobject.c compiler warnings

The SIGCHECK macro defined here has always been bizarre, but
it apparently causes compiler warnings on "Sun Studio 11".
I believe the warnings are bogus, but it doesn't hurt to make
the macro definition saner.

Bugfix candidate (but I'm not going to bother).

18 years agoRepair idiot typo, and complete the job of trying to
Tim Peters [Thu, 25 May 2006 22:25:25 +0000 (22:25 +0000)]
Repair idiot typo, and complete the job of trying to
use the Windows time.clock() implementation on Win64.

18 years agoMove over to use of METH_O and METH_NOARGS.
Brett Cannon [Thu, 25 May 2006 22:00:14 +0000 (22:00 +0000)]
Move over to use of METH_O and METH_NOARGS.

18 years agoAdd missing files from x86 darwin ctypes patch
Bob Ippolito [Thu, 25 May 2006 21:58:05 +0000 (21:58 +0000)]
Add missing files from x86 darwin ctypes patch

18 years agoWhitespace normalization.
Tim Peters [Thu, 25 May 2006 21:52:19 +0000 (21:52 +0000)]
Whitespace normalization.

18 years agoSome Win64 pre-release in 2000 didn't support
Tim Peters [Thu, 25 May 2006 21:50:17 +0000 (21:50 +0000)]
Some Win64 pre-release in 2000 didn't support
QueryPerformanceCounter(), but we believe Win64 does
support it now.  So use in time.clock().

It would be peachy if someone with a Win64 box tried
this ;-)

18 years agoChange test_values so that it compares the lowercasing of group names since getgrall...
Brett Cannon [Thu, 25 May 2006 21:33:11 +0000 (21:33 +0000)]
Change test_values so that it compares the lowercasing of group names since getgrall() can return all lowercase names while getgrgid() returns proper casing.

Discovered on Ubuntu 5.04 (custom).

18 years agoFix minor typo in prep_cif.c
Ronald Oussoren [Thu, 25 May 2006 21:30:54 +0000 (21:30 +0000)]
Fix minor typo in prep_cif.c

18 years agoAdd a x-ref to newer calling APIs.
Georg Brandl [Thu, 25 May 2006 21:11:56 +0000 (21:11 +0000)]
Add a x-ref to newer calling APIs.

18 years agofix test_float regression and 64-bit size mismatch issue
Bob Ippolito [Thu, 25 May 2006 21:09:45 +0000 (21:09 +0000)]
fix test_float regression and 64-bit size mismatch issue

18 years agosquelch gcc4 darwin/x86 compiler warnings
Bob Ippolito [Thu, 25 May 2006 20:52:38 +0000 (20:52 +0000)]
squelch gcc4 darwin/x86 compiler warnings

18 years agoSwap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() .
Brett Cannon [Thu, 25 May 2006 20:44:08 +0000 (20:44 +0000)]
Swap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() .

18 years agoSomeone seems to just have copy-pasted the docs of
Georg Brandl [Thu, 25 May 2006 20:28:10 +0000 (20:28 +0000)]
Someone seems to just have copy-pasted the docs of
tp_compare to tp_richcompare ;)

18 years agoenable darwin/x86 support for libffi and hence ctypes (doesn't yet support --enable...
Bob Ippolito [Thu, 25 May 2006 19:59:56 +0000 (19:59 +0000)]
enable darwin/x86 support for libffi and hence ctypes (doesn't yet support --enable-universalsdk)

18 years agoUse faster struct pack/unpack functions for the endian table that matches the host's
Bob Ippolito [Thu, 25 May 2006 19:56:56 +0000 (19:56 +0000)]
Use faster struct pack/unpack functions for the endian table that matches the host's

18 years agoUse LONG_MIN and LONG_MAX to check Python integer bounds instead of the incorrect...
Bob Ippolito [Thu, 25 May 2006 19:33:38 +0000 (19:33 +0000)]
Use LONG_MIN and LONG_MAX to check Python integer bounds instead of the incorrect INT_MIN and INT_MAX

18 years agoneedforspeed: use insert+reverse instead of append
Fredrik Lundh [Thu, 25 May 2006 19:19:05 +0000 (19:19 +0000)]
needforspeed: use insert+reverse instead of append

18 years agoReplace PyObject_CallFunction calls with only object args
Georg Brandl [Thu, 25 May 2006 19:15:31 +0000 (19:15 +0000)]
Replace PyObject_CallFunction calls with only object args
with PyObject_CallFunctionObjArgs, which is 30% faster.

18 years agofix a struct regression where long would be returned for short unsigned integers
Bob Ippolito [Thu, 25 May 2006 19:15:27 +0000 (19:15 +0000)]
fix a struct regression where long would be returned for short unsigned integers

18 years agoFix Cygwin compiler issue
Bob Ippolito [Thu, 25 May 2006 19:03:19 +0000 (19:03 +0000)]
Fix Cygwin compiler issue

18 years ago* eliminate warning by reverting tmp_s type to 'const char*'
Jack Diederich [Thu, 25 May 2006 18:47:15 +0000 (18:47 +0000)]
* eliminate warning by reverting tmp_s type to 'const char*'

18 years agoStruct now unpacks to PY_LONG_LONG directly when possible, also include #ifdef'ed...
Bob Ippolito [Thu, 25 May 2006 18:44:50 +0000 (18:44 +0000)]
Struct now unpacks to PY_LONG_LONG directly when possible, also include #ifdef'ed out code that will return int instead of long when in bounds (not active since it's an API and doc change)

18 years agoneedforspeed: use fastsearch also for find/index and contains. the
Fredrik Lundh [Thu, 25 May 2006 18:44:29 +0000 (18:44 +0000)]
needforspeed: use fastsearch also for find/index and contains.  the
related tests are now about 10x faster.

18 years agoGuard the _active.remove() call to avoid errors when there is no _active list.
Georg Brandl [Thu, 25 May 2006 18:44:09 +0000 (18:44 +0000)]
Guard the _active.remove() call to avoid errors when there is no _active list.

18 years agoFaster path for PyLong_FromLongLong, using PyLong_FromLong algorithm
Bob Ippolito [Thu, 25 May 2006 18:20:23 +0000 (18:20 +0000)]
Faster path for PyLong_FromLongLong, using PyLong_FromLong algorithm

18 years agoAdded overflow test for adding two (very) large strings where the
Andrew Dalke [Thu, 25 May 2006 18:18:39 +0000 (18:18 +0000)]
Added overflow test for adding two (very) large strings where the
new string is over max Py_ssize_t.  I have no way to test it on my
box or any box I have access to.  At least it doesn't break anything.

18 years agoComment typo
Andrew M. Kuchling [Thu, 25 May 2006 18:11:16 +0000 (18:11 +0000)]
Comment typo

18 years agoCode had returned an ssize_t, upcast to long, then converted with PyInt_FromLong.
Andrew Dalke [Thu, 25 May 2006 18:03:25 +0000 (18:03 +0000)]
Code had returned an ssize_t, upcast to long, then converted with PyInt_FromLong.
Now using PyInt_FromSsize_t.

18 years agoneedforspeed: use "fastsearch" for count. this results in a 3x speedup
Fredrik Lundh [Thu, 25 May 2006 17:55:31 +0000 (17:55 +0000)]
needforspeed: use "fastsearch" for count.  this results in a 3x speedup
for the related stringbench tests.

18 years agoFixed problem identified by Georg. The special-case in-place code for replace
Andrew Dalke [Thu, 25 May 2006 17:53:00 +0000 (17:53 +0000)]
Fixed problem identified by Georg.  The special-case in-place code for replace
made a copy of the string using PyString_FromStringAndSize(s, n) and modify
the copied string in-place.  However, 1 (and 0) character strings are shared
from a cache.  This cause "A".replace("A", "a") to change the cached version
of "A" -- used by everyone.

Now may the copy with NULL as the string and do the memcpy manually.  I've
added regression tests to check if this happens in the future.  Perhaps
there should be a PyString_Copy for this case?

18 years agoA new table to help string->integer conversion was added yesterday to
Tim Peters [Thu, 25 May 2006 17:34:03 +0000 (17:34 +0000)]
A new table to help string->integer conversion was added yesterday to
both mystrtoul.c and longobject.c.  Share the table instead.  Also
cut its size by 64 entries (they had been used for an inscrutable
trick originally, but the code no longer tries to use that trick).

18 years agoneedforspeed: new replace implementation by Andrew Dalke. replace is
Fredrik Lundh [Thu, 25 May 2006 17:08:14 +0000 (17:08 +0000)]
needforspeed: new replace implementation by Andrew Dalke.  replace is
now about 3x faster on my machine, for the replace tests from string-
bench.

18 years agoneedforspeed: check for overflow in replace (from Andrew Dalke)
Fredrik Lundh [Thu, 25 May 2006 16:46:54 +0000 (16:46 +0000)]
needforspeed: check for overflow in replace (from Andrew Dalke)

18 years agoFix incorrect documentation for the Py_IS_FINITE(X) macro.
Kristján Valur Jónsson [Thu, 25 May 2006 16:39:27 +0000 (16:39 +0000)]
Fix incorrect documentation for the Py_IS_FINITE(X) macro.

18 years agoFix another typo
Andrew M. Kuchling [Thu, 25 May 2006 16:34:54 +0000 (16:34 +0000)]
Fix another typo

18 years agoAdded tests for implementation error we came up with in the need for speed sprint.
Andrew Dalke [Thu, 25 May 2006 16:30:52 +0000 (16:30 +0000)]
Added tests for implementation error we came up with in the need for speed sprint.

18 years agoFix comment typos
Andrew M. Kuchling [Thu, 25 May 2006 16:23:15 +0000 (16:23 +0000)]
Fix comment typos

18 years agoneedforspeed: _toupper/_tolower is a SUSv2 thing; fall back on ISO C
Fredrik Lundh [Thu, 25 May 2006 16:10:12 +0000 (16:10 +0000)]
needforspeed: _toupper/_tolower is a SUSv2 thing; fall back on ISO C
versions if they're not defined.

18 years agoAdded a new macro, Py_IS_FINITE(X). On windows there is an intrinsic for this and...
Kristján Valur Jónsson [Thu, 25 May 2006 15:53:30 +0000 (15:53 +0000)]
Added a new macro, Py_IS_FINITE(X).  On windows there is an intrinsic for this and it is more efficient than to use !Py_IS_INFINITE(X) && !Py_IS_NAN(X).  No change on other platforms

18 years agoneedforspeed: make new upper/lower work properly for single-character
Fredrik Lundh [Thu, 25 May 2006 15:49:45 +0000 (15:49 +0000)]
needforspeed: make new upper/lower work properly for single-character
strings too... (thanks to georg brandl for spotting the exact problem
faster than anyone else)

18 years agoneedforspeed: speed up upper and lower for 8-bit string objects.
Fredrik Lundh [Thu, 25 May 2006 15:22:03 +0000 (15:22 +0000)]
needforspeed: speed up upper and lower for 8-bit string objects.
(the unicode versions of these are still 2x faster on windows,
though...)

based on work by Andrew Dalke, with tweaks by yours truly.

18 years agoAdd entry; and fix a typo
Andrew M. Kuchling [Thu, 25 May 2006 12:27:59 +0000 (12:27 +0000)]
Add entry; and fix a typo

18 years agoUpdate graminit.c for the fix for #1488915, Multiple dots in relative import
Thomas Wouters [Thu, 25 May 2006 11:26:25 +0000 (11:26 +0000)]
Update graminit.c for the fix for #1488915, Multiple dots in relative import
statement raise SyntaxError, and add testcase.

18 years agoFix #1488915, Multiple dots in relative import statement raise SyntaxError.
Thomas Wouters [Thu, 25 May 2006 11:25:51 +0000 (11:25 +0000)]
Fix #1488915, Multiple dots in relative import statement raise SyntaxError.

18 years agoReplace tab inside comment with space.
Walter Dörwald [Thu, 25 May 2006 08:53:28 +0000 (08:53 +0000)]
Replace tab inside comment with space.

18 years agofix broken links in PDF
Fred Drake [Thu, 25 May 2006 02:42:25 +0000 (02:42 +0000)]
fix broken links in PDF
(SF patch #1281291, contributed by Rory Yorke)

18 years agoMinor edits; add an item
Andrew M. Kuchling [Thu, 25 May 2006 00:23:03 +0000 (00:23 +0000)]
Minor edits; add an item

18 years agoHeavily fiddled variant of patch #1442927: PyLong_FromString optimization.
Tim Peters [Wed, 24 May 2006 21:10:40 +0000 (21:10 +0000)]
Heavily fiddled variant of patch #1442927: PyLong_FromString optimization.

``long(str, base)`` is now up to 6x faster for non-power-of-2 bases.  The
largest speedup is for inputs with about 1000 decimal digits.  Conversion
from non-power-of-2 bases remains quadratic-time in the number of input
digits (it was and remains linear-time for bases 2, 4, 8, 16 and 32).

Speedups at various lengths for decimal inputs, comparing 2.4.3 with
current trunk.  Note that it's actually a bit slower for 1-digit strings:

  len  speedup
 ----  -------
   1     -4.5%
   2      4.6%
   3      8.3%
   4     12.7%
   5     16.9%
   6     28.6%
   7     35.5%
   8     44.3%
   9     46.6%
  10     55.3%
  11     65.7%
  12     77.7%
  13     73.4%
  14     75.3%
  15     85.2%
  16    103.0%
  17     95.1%
  18    112.8%
  19    117.9%
  20    128.3%
  30    174.5%
  40    209.3%
  50    236.3%
  60    254.3%
  70    262.9%
  80    295.8%
  90    297.3%
 100    324.5%
 200    374.6%
 300    403.1%
 400    391.1%
 500    388.7%
 600    440.6%
 700    468.7%
 800    498.0%
 900    507.2%
1000    501.2%
2000    450.2%
3000    463.2%
4000    452.5%
5000    440.6%
6000    439.6%
7000    424.8%
8000    418.1%
9000    417.7%

18 years agoDisable the damn empty-string replace test -- it can't
Tim Peters [Wed, 24 May 2006 21:00:45 +0000 (21:00 +0000)]
Disable the damn empty-string replace test -- it can't
be make to pass now for unicode if it passes for str, or
vice versa.

18 years agoWhitespace normalization.
Tim Peters [Wed, 24 May 2006 20:29:44 +0000 (20:29 +0000)]
Whitespace normalization.

18 years agoWe can't leave the checked-in tests broken.
Tim Peters [Wed, 24 May 2006 20:27:18 +0000 (20:27 +0000)]
We can't leave the checked-in tests broken.

18 years agoAdded a slew of test for string replace, based various corner cases from
Andrew Dalke [Wed, 24 May 2006 18:55:37 +0000 (18:55 +0000)]
Added a slew of test for string replace, based various corner cases from
the Need For Speed sprint coding.  Includes commented out overflow tests
which will be uncommented once the code is fixed.

This test will break the 8-bit string tests because
    "".replace("", "A") == "" when it should == "A"

We have a fix for it, which should be added tomorrow.

18 years agoneedforspeed: refactored the replace code slightly; special-case
Fredrik Lundh [Wed, 24 May 2006 16:35:18 +0000 (16:35 +0000)]
needforspeed: refactored the replace code slightly; special-case
constant-length changes; use fastsearch to locate the first match.

18 years agorefactor unpack, add unpack_from
Bob Ippolito [Wed, 24 May 2006 15:32:06 +0000 (15:32 +0000)]
refactor unpack, add unpack_from

18 years agoneedforspeedindeed: use fastsearch also for __contains__
Fredrik Lundh [Wed, 24 May 2006 15:11:01 +0000 (15:11 +0000)]
needforspeedindeed: use fastsearch also for __contains__

18 years agoneedforspeed: use "fastsearch" for count and findstring helpers. this
Fredrik Lundh [Wed, 24 May 2006 14:28:11 +0000 (14:28 +0000)]
needforspeed: use "fastsearch" for count and findstring helpers.  this
results in a 2.5x speedup on the stringbench count tests, and a 20x (!)
speedup on the stringbench search/find/contains test, compared to 2.5a2.

for more on the algorithm, see:

    http://effbot.org/zone/stringlib.htm

if you get weird results, you can disable the new algoritm by undefining
USE_FAST in Objects/unicodeobject.c.

enjoy /F

18 years agouse Py_ssize_t for string indexes (thanks, neal!)
Fredrik Lundh [Wed, 24 May 2006 10:20:36 +0000 (10:20 +0000)]
use Py_ssize_t for string indexes (thanks, neal!)

18 years agoAdd missing svn:eol-style property to text files.
Tim Peters [Tue, 23 May 2006 21:55:53 +0000 (21:55 +0000)]
Add missing svn:eol-style property to text files.

18 years agoWhitespace normalization.
Tim Peters [Tue, 23 May 2006 21:54:23 +0000 (21:54 +0000)]
Whitespace normalization.

18 years agotest_struct grew weird behavior under regrtest.py -R,
Tim Peters [Tue, 23 May 2006 21:51:35 +0000 (21:51 +0000)]
test_struct grew weird behavior under regrtest.py -R,
due to a module-level cache.  Clearing the cache should
make it stop showing up in refleak reports.

18 years agoreturn 0 on misses, not -1.
Fredrik Lundh [Tue, 23 May 2006 19:47:35 +0000 (19:47 +0000)]
return 0 on misses, not -1.

18 years agoGet the Windows build working again (recover from
Tim Peters [Tue, 23 May 2006 19:34:37 +0000 (19:34 +0000)]
Get the Windows build working again (recover from
`struct` module changes).

18 years agoAdd item
Andrew M. Kuchling [Tue, 23 May 2006 19:32:35 +0000 (19:32 +0000)]
Add item

18 years agofix typo in _struct
Bob Ippolito [Tue, 23 May 2006 19:32:25 +0000 (19:32 +0000)]
fix typo in _struct

18 years agoforward declaration for PyStructType
Bob Ippolito [Tue, 23 May 2006 19:31:23 +0000 (19:31 +0000)]
forward declaration for PyStructType

18 years agoAdd two items
Andrew M. Kuchling [Tue, 23 May 2006 19:29:38 +0000 (19:29 +0000)]
Add two items

18 years agofix linking issue, warnings, in struct
Bob Ippolito [Tue, 23 May 2006 19:25:52 +0000 (19:25 +0000)]
fix linking issue, warnings, in struct

18 years agopatch #1493701: performance enhancements for struct module
Bob Ippolito [Tue, 23 May 2006 19:12:41 +0000 (19:12 +0000)]
patch #1493701: performance enhancements for struct module

18 years agopatch #1493701: performance enhancements for struct module
Bob Ippolito [Tue, 23 May 2006 19:11:34 +0000 (19:11 +0000)]
patch #1493701: performance enhancements for struct module

18 years agorevert #1493701
Bob Ippolito [Tue, 23 May 2006 19:09:51 +0000 (19:09 +0000)]
revert #1493701

18 years agoRemove duplicate item
Andrew M. Kuchling [Tue, 23 May 2006 19:00:45 +0000 (19:00 +0000)]
Remove duplicate item

18 years agoPatch #1493701: performance enhancements for struct module.
Bob Ippolito [Tue, 23 May 2006 18:46:41 +0000 (18:46 +0000)]
Patch #1493701: performance enhancements for struct module.

18 years agoBug #1334662 / patch #1335972: int(string, base) wrong answers.
Tim Peters [Tue, 23 May 2006 18:45:30 +0000 (18:45 +0000)]
Bug #1334662 / patch #1335972:  int(string, base) wrong answers.

In rare cases of strings specifying true values near sys.maxint,
and oddball bases (not decimal or a power of 2), int(string, base)
could deliver insane answers.  This repairs all such problems, and
also speeds string->int significantly.  On my box, here are %
speedups for decimal strings of various lengths:

length speedup
------ -------
 1       12.4%
 2       15.7%
 3       20.6%
 4       28.1%
 5       33.2%
 6       37.5%
 7       41.9%
 8       46.3%
 9       51.2%
10       19.5%
11       19.9%
12       23.9%
13       23.7%
14       23.3%
15       24.9%
16       25.3%
17       28.3%
18       27.9%
19       35.7%

Note that the difference between 9 and 10 is the difference between
short and long Python ints on a 32-bit box.  The patch doesn't
actually do anything to speed conversion to long:  the speedup is
due to detecting "unsigned long" overflow more quickly.

This is a bugfix candidate, but it's a non-trivial patch and it
would be painful to separate the "bug fix" from the "speed up" parts.

18 years agoneedforspeed: use append+reverse for rsplit, use "bloom filters" to
Fredrik Lundh [Tue, 23 May 2006 18:44:25 +0000 (18:44 +0000)]
needforspeed: use append+reverse for rsplit, use "bloom filters" to
speed up splitlines and strip with charsets; etc.  rsplit is now as
fast as split in all our tests (reverse takes no time at all), and
splitlines() is nearly as fast as a plain split("\n") in our tests.
and we're not done yet... ;-)

18 years agoUpdate Misc/NEWS for gzip patch #1281707
Bob Ippolito [Tue, 23 May 2006 18:43:47 +0000 (18:43 +0000)]
Update Misc/NEWS for gzip patch #1281707

18 years agoUpdate Misc/NEWS for gzip patch #1281707
Bob Ippolito [Tue, 23 May 2006 18:41:17 +0000 (18:41 +0000)]
Update Misc/NEWS for gzip patch #1281707

18 years agofix broken merge
Richard Jones [Tue, 23 May 2006 18:32:11 +0000 (18:32 +0000)]
fix broken merge

18 years agoApplied patch 1337051 by Neal Norwitz, saving 4 ints on frame objects.
Richard Jones [Tue, 23 May 2006 18:28:17 +0000 (18:28 +0000)]
Applied patch 1337051 by Neal Norwitz, saving 4 ints on frame objects.

18 years agoAn improved script for building the binary distribution on MacOSX.
Ronald Oussoren [Tue, 23 May 2006 15:09:57 +0000 (15:09 +0000)]
An improved script for building the binary distribution on MacOSX.

18 years agoUse 'speed' instead of 'performance', because I agree with the argument
Andrew M. Kuchling [Tue, 23 May 2006 12:49:35 +0000 (12:49 +0000)]
Use 'speed' instead of 'performance', because I agree with the argument
at http://zestyping.livejournal.com/193260.html that 'erformance' really means
something more general.

18 years agoMention string improvements
Andrew M. Kuchling [Tue, 23 May 2006 12:47:01 +0000 (12:47 +0000)]
Mention string improvements

18 years agoAdd some items; mention the sprint
Andrew M. Kuchling [Tue, 23 May 2006 12:44:36 +0000 (12:44 +0000)]
Add some items; mention the sprint

18 years agoPatch #1488098.
Ronald Oussoren [Tue, 23 May 2006 12:01:11 +0000 (12:01 +0000)]
Patch #1488098.

This patchs makes it possible to create a universal build on OSX 10.4 and use
the result to build extensions on 10.3. It also makes it possible to override
the '-arch' and '-isysroot' compiler arguments for specific extensions.

18 years agoDisable linking extensions with -lpython2.5 for darwin. This should fix bug
Ronald Oussoren [Tue, 23 May 2006 11:47:16 +0000 (11:47 +0000)]
Disable linking extensions with -lpython2.5 for darwin. This should fix bug
#1487105.

18 years agoPyErr_NewException now accepts a tuple of base classes as its
Georg Brandl [Tue, 23 May 2006 11:17:21 +0000 (11:17 +0000)]
PyErr_NewException now accepts a tuple of base classes as its
"base" parameter.

18 years agoAvoid creating a mess when installing a framework for the second time.
Ronald Oussoren [Tue, 23 May 2006 11:04:24 +0000 (11:04 +0000)]
Avoid creating a mess when installing a framework for the second time.

18 years agoMerge from rjones-funccall branch.
Richard Jones [Tue, 23 May 2006 10:37:38 +0000 (10:37 +0000)]
Merge from rjones-funccall branch.

Applied patch zombie-frames-2.diff from sf patch 876206 with updates for
Python 2.5 and also modified to retain the free_list to avoid the 67%
slow-down in pybench recursion test. 5% speed up in function call pybench.

18 years agoneedforspeed: fixed unicode "in" operator to use same implementation
Fredrik Lundh [Tue, 23 May 2006 10:12:21 +0000 (10:12 +0000)]
needforspeed: fixed unicode "in" operator to use same implementation
approach as find/index

18 years agoneedforspeed: check first *and* last character before doing a full memcmp
Fredrik Lundh [Tue, 23 May 2006 10:10:57 +0000 (10:10 +0000)]
needforspeed: check first *and* last character before doing a full memcmp

18 years agounicode_repeat(): Change type of local to Py_ssize_t,
Tim Peters [Tue, 23 May 2006 05:47:16 +0000 (05:47 +0000)]
unicode_repeat():  Change type of local to Py_ssize_t,
since that's what it should be.

18 years agoPyUnicode_Join(): Recent code changes introduced new
Tim Peters [Mon, 22 May 2006 19:17:04 +0000 (19:17 +0000)]
PyUnicode_Join():  Recent code changes introduced new
compiler warnings on Windows (signed vs unsigned mismatch
in comparisons).  Cleaned that up by switching more locals
to Py_ssize_t.  Simplified overflow checking (it can _be_
simpler because while these things are declared as
Py_ssize_t, then should in fact never be negative).

18 years agoneedforspeed: use memcpy for "long" strings; use a better algorithm
Fredrik Lundh [Mon, 22 May 2006 17:12:58 +0000 (17:12 +0000)]
needforspeed: use memcpy for "long" strings; use a better algorithm
for long repeats.

18 years agoneedforspeed: speed up unicode repeat, unicode string copy
Fredrik Lundh [Mon, 22 May 2006 16:29:30 +0000 (16:29 +0000)]
needforspeed: speed up unicode repeat, unicode string copy

18 years agoApply revised patch for GzipFile.readline performance #1281707
Bob Ippolito [Mon, 22 May 2006 15:59:12 +0000 (15:59 +0000)]
Apply revised patch for GzipFile.readline performance #1281707

18 years agodocstring tweaks: count counts non-overlapping substrings, not
Fredrik Lundh [Mon, 22 May 2006 15:35:12 +0000 (15:35 +0000)]
docstring tweaks: count counts non-overlapping substrings, not
total number of occurences