Neal Norwitz
73bf1018d6
Backport rev 55452:
...
Whoops, need to pay attention to those test failures.
Move the clear to *before* the first use, not after.
2007-05-19 04:37:31 +00:00
Neal Norwitz
f86ae691d3
Backport rev 55450:
...
SF bug #1721309 : Clear data so random memory does not get freed.
2007-05-19 03:53:33 +00:00
Walter Dörwald
0ac60611fe
Backport checkin:
...
Fix a segfault when b"" was passed to b2a_qp() -- it was using strchr()
instead of memchr().
2007-05-09 18:13:53 +00:00
Neal Norwitz
6ca6f1472c
Backport r55070: Stop using PyMem_FREE while the GIL is not held.
2007-05-09 06:45:53 +00:00
Kristján Valur Jónsson
a1392d5ace
Merge change 54982 from the trunk. This fixes the test_subprocess test in the testsuite for VisualStudio2005 builds, by "sanitizing" the "mode" that is used in the posixmodule's fdopen(). In particular the non-standard "U" mode character is removed.
2007-05-07 19:25:38 +00:00
Kristján Valur Jónsson
f4601d874f
Fix two problems that emerged when the testsuite was run with an x64 build: PyLong_FromSSize_t incorrectly assumed an unsigned object, and itertools.count() had the wrong upper limit for the iterator.
2007-05-07 18:30:48 +00:00
Thomas Heller
412b20bd31
Merged revisions 55027 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes
........
r55027 | thomas.heller | 2007-04-30 18:04:57 +0200 (Mo, 30 Apr 2007) | 8 lines
When accessing the .value attribute of a c_wchar_p instance, and the
instance does not point to a valid wchar_t zero-terminated string,
raise a ValueError. c_char_p does this already.
The ValueError message now contains the correct pointer address.
Will backport to release25-maint.
........
2007-05-02 19:41:16 +00:00
Kristján Valur Jónsson
55d53f0367
Merging of change 55024 from the truk to release25-maint branch.
...
Complete revamp of PCBuild8 directory. Use subdirectories for each project under the main pcbuild solution. Now make extensive use of property sheets to simplify project configuration. x64 build fully supported, and the process for building PGO version (Profiler Guided Optimization) simplified. All projects are now present, except _ssl, which needs to be reimplemented. Also, some of the projects that require external libraries need extra work to fully compile on x64.
2007-05-02 15:55:14 +00:00
Thomas Heller
f69fa1756f
Merged revisions 55025 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes
........
r55025 | thomas.heller | 2007-04-30 17:44:17 +0200 (Mo, 30 Apr 2007) | 4 lines
Make sure to call PyErr_NoMemory() in several places where
PyMem_Malloc() could potentially fail.
Will backport to the release25-maint branch.
........
2007-04-30 15:58:51 +00:00
Kristján Valur Jónsson
b9d39916ac
Properly implement Georg Brandl's Patch #1185447 to the 2.5 maintainance branch
2007-04-22 10:18:46 +00:00
Kristján Valur Jónsson
5e4e31f76a
Fix various minor issues discovered with static analysis using Visual Studio 2005 Team System.
...
Removed obsolete comment, since .dll modules are no longer supported on windows, only .pyd.
2007-04-21 12:46:49 +00:00
Neal Norwitz
ef4364f3b8
Fix unpack so it works on 64-bit platforms.
2007-04-05 05:06:49 +00:00
Raymond Hettinger
b2064d7280
Fix-up error-exits on struct_unpack().
2007-04-04 21:57:12 +00:00
Raymond Hettinger
3608f0570e
Bug #1563759 : struct.unpack doens't support buffer protocol objects
2007-04-04 20:32:03 +00:00
Martin v. Löwis
8863544522
Bug #1686475 : Support stat'ing open files on Windows again.
2007-04-04 18:30:56 +00:00
Matthias Klose
5d2d2ef1f5
- Fix an off-by-one bug in locale.strxfrm().
...
Patch taken from http://bugs.debian.org/416934 .
2007-04-03 04:39:34 +00:00
Raymond Hettinger
d6030acd7f
Array module's buffer interface can now handle empty arrays.
2007-04-02 22:39:08 +00:00
Raymond Hettinger
4bbcb64d5d
SF #1693079 Array module cannot pickle empty arrays
2007-04-02 17:03:46 +00:00
Neal Norwitz
65407fb734
Backport 54594:
...
Fix SF #1688393 , sock.recvfrom(-24) crashes
Also fix some method names that were copied incorrectly (trunk fixed).
2007-03-31 18:56:11 +00:00
Georg Brandl
7b1be36bb7
In Windows' time.clock(), when QueryPerformanceFrequency() fails,
...
the C lib's clock() is used, but it must be divided by CLOCKS_PER_SEC
as for the POSIX implementation (thanks to #pypy).
(backport from rev. 54606)
2007-03-29 12:42:16 +00:00
Thomas Heller
b151f721a9
Prevent creation (followed by a segfault) of array types when the size
...
overflows the valid Py_ssize_t range. Check return values of
PyMem_Malloc.
Backported from trunk.
2007-03-23 19:56:45 +00:00
Thomas Heller
50d1d0bad5
Explain the purpose of the b_needsfree flag. This answers Neals
...
question (well, two months too late).
2007-03-22 20:33:04 +00:00
Thomas Heller
02b8feea9f
Back out "Patch #1643874 : memory leak in ctypes fixed."
...
The code in this patch leaves no way to give up the ownership of a
BSTR instance.
2007-03-22 19:43:37 +00:00
Georg Brandl
d6e73c1785
Bug #1622896 : fix a rare corner case where the bz2 module raised an
...
error in spite of a succesful compression.
(backport from rev. 54336)
2007-03-13 12:34:35 +00:00
Thomas Heller
8bf469ddc1
Merged revisions 54248 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk/Lib/ctypes
........
r54248 | thomas.heller | 2007-03-09 21:39:22 +0100 (Fr, 09 Mär 2007) | 7 lines
Bug #1651235 : When a tuple was passed to a ctypes function call,
Python would crash instead of raising an error.
The crash was caused by a section of code that should have been
removed long ago, at that time ctypes had other ways to pass
parameters to function calls.
........
2007-03-09 20:48:57 +00:00
Thomas Heller
f7eed5e2d1
Merged revisions 54244 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk/Lib/ctypes
........
r54244 | thomas.heller | 2007-03-09 20:21:28 +0100 (Fr, 09 Mär 2007) | 3 lines
Fix bug #1646630 : ctypes.string_at(buf, 0) and ctypes.wstring_at(buf, 0)
returned string up to the first NUL character.
........
2007-03-09 20:21:16 +00:00
Walter Dörwald
05b5c7fe0e
Backport checkin:
...
Patch for bug #1633621 : if curses.resizeterm() or
curses.resize_term() is called, update _curses.LINES,
_curses.COLS, curses.LINES and curses.COLS.
2007-03-06 20:46:26 +00:00
Georg Brandl
62b1b001e6
Patch #1654417 : make operator.{get,set,del}slice use the full range
...
of Py_ssize_t.
(backport from rev. 54177)
2007-03-06 19:00:09 +00:00
Georg Brandl
02d7cffb8f
Patch #1646728 : datetime.fromtimestamp fails with negative
...
fractional times. With unittest.
(backport from rev. 54167 by Guido)
2007-03-06 17:46:17 +00:00
Georg Brandl
75e3c527f6
Fix another reincarnation of bug #1576657 in defaultdict.
...
(backport from rev. 54160)
2007-03-06 13:33:07 +00:00
Martin v. Löwis
b8d661bd5e
Revert r53672, just fix signature of time_isoformat instead.
2007-02-18 08:50:38 +00:00
Martin v. Löwis
1e335b2968
Patch #1657276 : Make NETLINK_DNRTMSG conditional.
2007-02-13 12:14:29 +00:00
Martin v. Löwis
2e8b602ac1
Bug #1653736 : Complain about keyword arguments to time.isoformat.
2007-02-08 09:13:51 +00:00
Raymond Hettinger
9f0e1ea964
Do not let overflows in enumerate() and count() pass silently.
2007-02-07 23:57:05 +00:00
Raymond Hettinger
113776c411
Check for a common user error with defaultdict().
2007-02-07 21:40:49 +00:00
Georg Brandl
3d26ef1d10
Bug #1645944 : os.access now returns bool but docstring is not updated
...
(backport from rev. 53579)
2007-01-27 19:38:56 +00:00
Thomas Heller
817b489422
Merged revisions 53556 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes
........
r53556 | thomas.heller | 2007-01-25 19:34:14 +0100 (Do, 25 Jan 2007) | 3 lines
Fix for #1643874 : When calling SysAllocString, create a PyCObject
which will eventually call SysFreeString to free the BSTR resource.
........
2007-01-25 19:19:35 +00:00
Andrew M. Kuchling
b8c6e1f33f
[Bug #1552726 ] Avoid unnecessary polling at the interpreter prompt when certain versions of readline are being used
2007-01-22 16:10:27 +00:00
Georg Brandl
8e932e7d68
Bug #1486663 : don't reject keyword arguments for subclasses of builtin
...
types.
(backport from rev. 53509)
2007-01-21 10:28:56 +00:00
Neal Norwitz
e962300d0c
Add a comment for some code I don't understand. Why would needsfree
...
be true if we didn't malloc the code? Seems like the code is wrong
or could use comments.
Also verify if the buildbots are working properly for the 2.5 branch.
2007-01-18 07:16:31 +00:00
Thomas Heller
2a98c56c13
Merged revisions 53466 via svnmerge from
...
svn+ssh://pythondev@svn.python.org/python/trunk/Modules/_ctypes
........
r53466 | thomas.heller | 2007-01-17 10:40:34 +0100 (Mi, 17 Jan 2007) | 2 lines
Replace C++ comments with C comments.
........
2007-01-17 09:53:03 +00:00
Thomas Heller
3193763bdf
Must update the version number on the extension module as well.
2007-01-10 20:44:21 +00:00
Raymond Hettinger
5b44cbe6d8
Fix zero-length corner case for iterating over a mutating deque.
2007-01-08 18:05:53 +00:00
Gregory P. Smith
1a050f5f52
support linking the _bsddb extension module against BerkeleyDB 4.5
...
[backport of r53252]
2007-01-05 02:09:06 +00:00
Martin v. Löwis
bea1c70144
Bug #1566280 : Explicitly invoke threading._shutdown from Py_Main,
...
to avoid relying on atexit.
2007-01-04 21:06:57 +00:00
Thomas Wouters
04e820443b
Backport trunk checkin r51565:
...
Fix SF bug #1545837 : array.array borks on deepcopy. array.__deepcopy__()
needs to take an argument, even if it doesn't actually use it.
2006-12-29 14:42:17 +00:00
Andrew M. Kuchling
9333ce189f
[Patch #1615868 by Lars Gustaebel] Use Py_off_t to fix BZ2File.seek() for offsets > 2Gb
2006-12-18 19:26:13 +00:00
Martin v. Löwis
95b744cea9
Patch #1544279 : Improve thread-safety of the socket module by moving
...
the sock_addr_t storage out of the socket object.
2006-12-03 11:24:00 +00:00
Thomas Heller
84a90cade5
Fix #1563807 : _ctypes built on AIX fails with ld ffi error.
...
The contents of ffi_darwin.c must be compiled unless __APPLE__ is
defined and __ppc__ is not.
Backport from trunk.
2006-11-28 20:43:11 +00:00
Thomas Heller
558e56d599
Fix bug #1598620 : A ctypes structure cannot contain itself.
...
Backport from trunk.
2006-11-24 19:00:39 +00:00