Commit Graph

4105 Commits

Author SHA1 Message Date
Brett Cannon 6d7db6ecc4 Remove unused variable. 2006-06-13 16:06:55 +00:00
Andrew MacIntyre 9291332de1 Patch #1454481: Make thread stack size runtime tunable.
Heavily revised, comprising revisions:
46640 - original trunk revision (backed out in r46655)
46647 - markup fix (backed out in r46655)
46692:46918 merged from branch aimacintyre-sf1454481

branch tested on buildbots (Windows buildbots had problems
not related to these changes).
2006-06-13 15:04:24 +00:00
Thomas Heller c2da994585 Add pep-291 compatibility markers. 2006-06-12 20:56:48 +00:00
Kristján Valur Jónsson f608317061 Fix the CRT argument error handling for VisualStudio .NET 2005. Install a CRT error handler and disable the assertion for debug builds. This causes CRT to set errno to EINVAL.
This update fixes crash cases in the test suite where the default CRT error handler would cause process exit.
2006-06-12 15:45:12 +00:00
Nick Coghlan 81f444bb8e Make the -m switch conform to the documentation of sys.path by behaving like the -c switch 2006-06-12 10:17:11 +00:00
Thomas Heller ee3ea5418e I don't know how that happend, but the entire file contents was
duplicated.  Thanks to Simon Percivall for the heads up.
2006-06-12 06:05:57 +00:00
Martin v. Löwis 70ee3ccd1e Get rid of function pointer cast. 2006-06-12 04:26:31 +00:00
Neal Norwitz 6e73aaab47 Patch #1503046, Conditional compilation of zlib.(de)compressobj.copy
copy is only in newer versions of zlib.  This should allow zlibmodule
to work with older versions like the Tru64 buildbot.
2006-06-12 03:33:09 +00:00
Neal Norwitz a6d80faf6c Impl ssize_t 2006-06-12 03:05:40 +00:00
Neal Norwitz 047f3c7ffa Fix some Py_ssize_t issues 2006-06-12 02:06:42 +00:00
Neal Norwitz c7074386b4 Fix some Py_ssize_t issues 2006-06-12 02:06:17 +00:00
Neal Norwitz 09a29fae8f Cleanup Py_ssize_t a little (get rid of second #ifdef) 2006-06-12 02:05:55 +00:00
Thomas Heller 0d5d222959 Release the GIL during COM method calls, to avoid deadlocks in
Python coded COM objects.
2006-06-11 17:04:22 +00:00
Neal Norwitz 3c5431e132 Wrap some long lines
Top/Bottom factor out some common expressions
Add a XXX comment about widing offset.
2006-06-11 05:45:25 +00:00
Neal Norwitz b4fcf8d787 Fix Coverity # 146. newDBSequenceObject would deref dbobj, so it can't be NULL.
We know it's not NULL from the ParseTuple and DbObject_Check will verify
it's not NULL.
2006-06-11 05:44:18 +00:00
Thomas Heller 9af2b44805 Handle failure of PyMem_Realloc. 2006-06-10 22:01:50 +00:00
Thomas Heller 9123edcc63 Don't use C++ comment. 2006-06-10 21:56:03 +00:00
Thomas Heller eb6dcf6b0d Fix the second occurrence of the problematic printf format. 2006-06-10 21:17:58 +00:00
Thomas Heller 5218ab263a Fix a wrong printf format. 2006-06-10 21:07:19 +00:00
Thomas Heller 45f59ab3ee Upgrade to ctypes version 0.9.9.7.
Summary of changes:

- support for 'variable sized' data
- support for anonymous structure/union fields
- fix severe bug with certain arrays or structures containing more than 256 fields
2006-06-10 19:51:46 +00:00
Martin v. Löwis 0e8bd7e1cc Patch #1495999: Part two of Windows CE changes.
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
2006-06-10 12:23:46 +00:00
Kristján Valur Jónsson dbeaa699cd Turn off warning about deprecated CRT functions on for VisualStudio .NET 2005.
Make the definition #ARRAYSIZE conditional.  VisualStudio .NET 2005 already has it defined using a better gimmick.
2006-06-09 16:28:01 +00:00
Brett Cannon de3b052216 Buffer objects would return the read or write buffer for a wrapped object when
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).
2006-06-08 17:00:45 +00:00
Brett Cannon 6ee7d01c05 Make binascii.hexlify() use s# for its arguments instead of t# to actually
match its documentation stating it accepts any read-only buffer.
2006-06-08 16:23:04 +00:00
Neal Norwitz f0cab1f6e2 Fix a refleak in recvfrom_into 2006-06-08 05:12:45 +00:00
Thomas Heller 861acee048 Fix for foreign functions returning small structures on 64-bit big
endian machines.  Should fix the remaininf failure in the PPC64
Debian buildbot.

Thanks to Matthias Klose for providing access to a machine to debug
and test this.
2006-06-07 20:43:06 +00:00
Thomas Heller b1998bc860 Use the same big-endian hack as in _ctypes/callproc.c for callback functions.
This fixes the callback function tests that return float.
2006-06-06 19:25:13 +00:00
Thomas Heller d8714dedfa Add a hack so that foreign functions returning float now do work on 64-bit
big endian platforms.
2006-06-06 18:50:46 +00:00
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