Commit graph

4377 commits

Author SHA1 Message Date
Tim Peters
bb21b2c50c BSequence_set_range(): Rev 46688 ("Fix a bunch of
parameter strings") changed this function's signature
seemingly by mistake, which is causing buildbots to fail
test_bsddb3.  Restored the pre-46688 signature.
2006-06-06 15:50:17 +00:00
Thomas Heller
07347d6efc Damn - the sentinel was missing. And fix another silly mistake. 2006-06-06 11:54:32 +00:00
Thomas Heller
ecc3e67b98 Convert CFieldObject tp_members to tp_getset, since there is no
structmember typecode for Py_ssize_t fields.  This should fix some of
the errors on the PPC64 debian machine (64-bit, big endian).

Assigning to readonly fields now raises AttributeError instead of
TypeError, so the testcase has to be changed as well.
2006-06-06 11:34:33 +00:00
Neal Norwitz
dd2a6bf14f Fix a bunch of parameter strings 2006-06-06 07:23:01 +00:00
Neal Norwitz
e0e797f9be Remove unused variable (and stop compiler warning) 2006-06-06 07:22:08 +00:00
Gregory P. Smith
3c228b19f0 - bsddb: the __len__ method of a DB object has been fixed to return correct
results.  It could previously incorrectly return 0 in some cases.
  Fixes SF bug 1493322 (pybsddb bug 1184012).
2006-06-05 23:59:37 +00:00
Gregory P. Smith
372b583a6b * fix DBCursor.pget() bug with keyword argument names when no data= is
supplied [SF pybsddb bug #1477863]
2006-06-05 18:48:21 +00:00
Gregory P. Smith
f0547d0d3e * add support for DBSequence objects [patch #1466734] 2006-06-05 17:38:04 +00:00
Gregory P. Smith
db8a80735b * support DBEnv.lsn_reset() method on BerkeleyDB >= 4.4 [patch #1494902] 2006-06-05 01:56:15 +00:00
Gregory P. Smith
76a82e89ab * support DBEnv.log_stat() method on BerkeleyDB >= 4.0 [patch #1494885] 2006-06-05 01:39:52 +00:00
Hye-Shik Chang
58ce5bc14c Fix a potentially invalid memory access of CJKCodecs' shift-jis
decoder.  (found by Neal Norwitz)
2006-06-05 00:59:54 +00:00
Gregory P. Smith
bad474544c fix a bug in the previous commit. don't leak empty list on error return and
fix the additional rare (out of memory only) bug that it was supposed to fix
of not freeing log_list when the python allocator failed.
2006-06-05 00:33:35 +00:00
Gregory P. Smith
3dd20022ac bugfix: when log_archive was called with the DB_ARCH_REMOVE flag present
in BerkeleyDB >= 4.2 it tried to construct a list out of an uninitialized
char **log_list.

feature: export the DB_ARCH_REMOVE flag by name in the module on BerkeleyDB >= 4.2.
2006-06-05 00:31:01 +00:00
Tim Peters
28eeefe566 Revert revisions:
46640 Patch #1454481:  Make thread stack size runtime tunable.
46647 Markup fix

The first is causing many buildbots to fail test runs, and there
are multiple causes with seemingly no immediate prospects for
repairing them.  See python-dev discussion.

Note that a branch can (and should) be created for resolving these
problems, like

svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH

followed by merging rev 46647 to the new branch.
2006-06-04 23:52:47 +00:00
Martin v. Löwis
3f767795f6 Patch #1359618: Speed-up charmap encoder. 2006-06-04 19:36:28 +00:00
Tim Peters
5ec2e85d0c s_methods[]: Stop compiler warnings by casting
s_unpack_from to PyCFunction.
2006-06-04 15:49:07 +00:00
Martin Blais
af2ae72cb2 Fixes in struct and socket from merge reviews.
- Following Guido's comments, renamed

  * pack_to -> pack_into
  * recv_buf -> recv_into
  * recvfrom_buf -> recvfrom_into

- Made fixes to _struct.c according to Neal Norwitz comments on the checkins
  list.

- Converted some ints into the appropriate -- I hope -- ssize_t and size_t.
2006-06-04 13:49:49 +00:00
Andrew MacIntyre
6539d2d3c7 Patch #1454481: Make thread stack size runtime tunable. 2006-06-04 12:31:09 +00:00
Fredrik Lundh
81707f1a8c "_self" is a said to be a reserved word in Watcom C 10.6. I'm
not sure that's really standard compliant behaviour, but I guess
we have to fix that anyway...
2006-06-03 21:56:05 +00:00
Andrew M. Kuchling
36f6d77931 [Bug #1497414] _self is a reserved word in the WATCOM 10.6 C compiler.
Fix by renaming the variable.

In a different module, Neal fixed it by renaming _self to self.  There's
already a variable named 'self' here, so I used selfptr.

(I'm committing this on a Mac without Tk, but it's a simple search-and-replace.
<crosses fingers>, so  I'll watch the buildbots and see what happens.)
2006-06-03 19:02:35 +00:00
Neal Norwitz
752968eaf8 More memory leaks from valgrind 2006-06-02 04:54:52 +00:00
Tim Peters
72270c220e Repaired error in new comment. 2006-05-31 15:34:37 +00:00
Tim Peters
d6a6f023c8 _range_error(): Speed and simplify (there's no real need for
loops here).  Assert that size_t is actually big enough, and
that f->size is at least one.  Wrap a long line.
2006-05-31 15:33:22 +00:00
Tim Peters
c2b550e16e Trimmed trailing whitespace. 2006-05-31 14:28:07 +00:00
Thomas Heller
bd16bce81f PyTuple_Pack is not available in Python 2.3, but ctypes must stay
compatible with that.
2006-05-31 11:37:58 +00:00
Neal Norwitz
971ea11e4c Calculate smallest properly (it was off by one) and use proper ssize_t types for Win64 2006-05-31 07:43:27 +00:00
Bob Ippolito
4182a75571 Change wrapping terminology to overflow masking 2006-05-30 17:37:54 +00:00
Neal Norwitz
1e44ca94ac Simplify further by using AddStringConstant 2006-05-30 03:18:50 +00:00
Bob Ippolito
2fd3977a9d struct: modulo math plus warning on all endian-explicit formats for compatibility with older struct usage (ugly) 2006-05-29 22:55:48 +00:00
Georg Brandl
a355c14fa1 Whoops. 2006-05-29 22:00:30 +00:00
Georg Brandl
bf92f46572 Convert more modules to METH_VARARGS. 2006-05-29 21:58:42 +00:00
Georg Brandl
96a8c3954c Make use of METH_O and METH_NOARGS where possible.
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
2006-05-29 21:04:52 +00:00
Georg Brandl
2cfaa34dfa Correct some value converting strangenesses. 2006-05-29 19:39:45 +00:00
Armin Rigo
162997efb1 Silence a warning. 2006-05-29 17:59:47 +00:00
Bob Ippolito
28b2686260 simplify the struct code a bit (no functional changes) 2006-05-29 15:47:29 +00:00
Georg Brandl
bda0744d55 Convert fmmodule to METH_VARARGS. 2006-05-29 13:53:16 +00:00
Nick Coghlan
c649ec5b69 Apply modified version of Collin Winter's patch #1478788
Renames functional extension module to _functools and adds a Python
functools module so that utility functions like update_wrapper can be
added easily.
2006-05-29 12:43:05 +00:00
Georg Brandl
c7c51147c7 Fix refleak in socketmodule. Replace bogus Py_BuildValue calls.
Fix refleak in exceptions.
2006-05-29 09:46:51 +00:00
Georg Brandl
964f5978dc METH_NOARGS functions do get called with two args. 2006-05-28 22:38:57 +00:00
Georg Brandl
660222f955 Convert audioop over to METH_VARARGS. 2006-05-28 22:34:51 +00:00
Georg Brandl
fbef5888e7 Fix C function calling conventions in _sre module. 2006-05-28 22:14:04 +00:00
Georg Brandl
c26025c562 Fix ref-antileak in _struct.c which eventually lead to deallocating None. 2006-05-28 21:42:54 +00:00
Bob Ippolito
cd51ca5b11 fix struct regression on 64-bit platforms 2006-05-27 15:53:49 +00:00
Jack Diederich
2d40077b4f needforspeed: use PyObject_MALLOC instead of system malloc for small
allocations.  Use PyMem_MALLOC for larger (1k+) chunks.  1%-2% speedup.
2006-05-27 15:44:34 +00:00
Richard Jones
7b9558d37d Conversion of exceptions over from faked-up classes to new-style C types. 2006-05-27 12:29:24 +00:00
Bob Ippolito
1fcdc232db Fix up struct docstrings, add struct.pack_to function for symmetry 2006-05-27 12:11:36 +00:00
Bob Ippolito
90bd0a554e Remove the range checking and int usage #defines from _struct and strip out the now-dead code 2006-05-27 11:47:12 +00:00
Martin v. Löwis
d532ba0746 Explain why 'consumed' is initialized. 2006-05-27 08:54:29 +00:00
Martin v. Löwis
d004fc810a Patch 1494554: Update numeric properties to Unicode 4.1. 2006-05-27 08:36:52 +00:00
Neal Norwitz
2f3136b8f0 Fix compiler warning (and whitespace) on Mac OS 10.4. (A lot of this code looked duplicated, I wonder if a utility function could help reduce the duplication here.) 2006-05-27 05:18:57 +00:00