Thomas Heller [Wed, 22 Mar 2006 12:59:53 +0000 (12:59 +0000)]
Include <malloc.h> on windows, to avoid warnings when compiling with mingw.
Don't use SEH when compiling wth mingw.
Use IS_INTRESOURCE to determine function name from function ordinal.
Rewrite the code that allocates and frees callback functions, hopefully
this avoids the coverty warnings: Remove the THUNK typedef, and move the
definition of struct ffi_info into the header file.
Tim Peters [Tue, 21 Mar 2006 03:58:41 +0000 (03:58 +0000)]
Try to repair at least one segfault on the Mac buildbot,
as diagnosed by Nick Coghlan.
test_capi.py: A test module should never spawn a thread as
a side effect of being imported. Because this one did, the
segfault one of its thread tests caused didn't occur until
a few tests after test_regrtest.py thought test_capi was
finished. Repair that. Also join() the thread spawned
at the end, so that test_capi is truly finished when
regrtest reports that it's done.
_testcapimodule.c test_thread_state(): this spawns a
couple of non-threading.py threads, passing them a PyObject*
argument, but did nothing to ensure that those threads
finished before returning. As a result, the PyObject*
_could_ (although this was unlikely) get decref'ed out of
existence before the threads got around to using it.
Added explicit synchronization (via a Python mutex) so
that test_thread_state can reliably wait for its spawned
threads to finish.
Neal Norwitz [Mon, 20 Mar 2006 06:30:08 +0000 (06:30 +0000)]
Patch #1309579: wait3 and wait4 were added to the posix module by Chad J. Schroeder.
This was a fair amount of rework of the patch. Refactored test_fork1 so it
could be reused by the new tests for wait3/4. Also made them into new style
unittests (derive from unittest.TestCase).
Anthony Baxter [Mon, 20 Mar 2006 05:21:58 +0000 (05:21 +0000)]
SF [ 1231053 ] audioop - alaw encoding/decoding added, code updated
This patch adds a-LAW encoding to audioop and replaces the old
u-LAW encoding/decoding code with the current code from sox.
Neal Norwitz [Mon, 20 Mar 2006 01:53:23 +0000 (01:53 +0000)]
Use macro versions instead of function versions when we already know the type.
This will hopefully get rid of some Coverity warnings, be a hint to
developers, and be marginally faster.
Some asserts were added when the type is currently known, but depends
on values from another function.
Georg Brandl [Sat, 18 Mar 2006 07:59:59 +0000 (07:59 +0000)]
Previously, Python code had no easy way to access the contents of a
cell object. Now, a ``cell_contents`` attribute has been added
(closes patch #1170323).
Thomas Heller [Fri, 17 Mar 2006 15:52:58 +0000 (15:52 +0000)]
Merge changes from the upstream version:
- cast is implemented as a foreign function now
- On Windows, it is now possible to access functions exported by ordinal only
Tim Peters [Fri, 17 Mar 2006 03:29:34 +0000 (03:29 +0000)]
Introduced symbol PY_FORMAT_SIZE_T. See the new comments
in pyport.h. Changed PyString_FromFormatV() to use it
instead of inlining its own maze of #if'ery.
Walter Dörwald [Thu, 16 Mar 2006 21:46:40 +0000 (21:46 +0000)]
Fix wrong argument format in PyCodec_IncrementalEncoder() and
PyCodec_IncrementalDecoder().
Factor out common code from PyCodec_Encoder()/PyCodec_Decoder(),
PyCodec_IncrementalEncoder()/PyCodec_IncrementalDecoder() and
PyCodec_StreamReader()/PyCodec_StreamWriter().
Trent Mick [Thu, 16 Mar 2006 17:34:41 +0000 (17:34 +0000)]
Update test_winsound to check for a configured sound card (using a VBScript
helper written by Roger Upole and Mark Hammond) and adjust the expected
PlaySoundTest case results accordingly.
Tim Peters [Thu, 16 Mar 2006 01:14:46 +0000 (01:14 +0000)]
Merge the tim-obmalloc branch to the trunk.
This is a heavily altered derivative of SF patch 1123430, Evan
Jones's heroic effort to make obmalloc return unused arenas to
the system free(), with some heuristic strategies to make it
more likley that arenas eventually _can_ be freed.