summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Backport from py3k: Implement the new buffer interface from pep3118Thomas Heller2008-06-054-24/+264
| | | | for ctypes instances. Closes issue #2404.
* MacOS X: Enable 4-way universal buildsRonald Oussoren2008-06-052-2/+2
| | | | | | | | | | | | | | | | | | This patch adds a new configure argument on OSX: --with-universal-archs=[32-bit|64-bit|all] When used with the --enable-universalsdk option this controls which CPU architectures are includes in the framework. The default is 32-bit, meaning i386 and ppc. The most useful alternative is 'all', which includes all 4 CPU architectures supported by MacOS X (i386, ppc, x86_64 and ppc64). This includes limited support for the Carbon bindings in 64-bit mode as well, limited because (a) I haven't done extensive testing and (b) a large portion of the Carbon API's aren't available in 64-bit mode anyway. I've also duplicated a feature of Apple's build of python: setting the environment variable 'ARCHFLAGS' controls the '-arch' flags used for building extensions using distutils.
* Revert revisions 63943 and 63942 (Issue #1798: Add ctypes callingThomas Heller2008-06-044-184/+4
| | | | | | | | convention that allows safe access to errno) This code does not yet work on OS X (__thread storage specifier not available), so i needs a configure check plus a more portable solution.
* Fix ctypes.set_errno for gcc.Thomas Heller2008-06-041-2/+4
|
* Issue #1798: Add ctypes calling convention that allows safe access toThomas Heller2008-06-044-4/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | errno (and LastError, on Windows). ctypes maintains a module-global, but thread-local, variable that contains an error number; called 'ctypes_errno' for this discussion. This variable is a private copy of the systems 'errno' value; the copy is swapped with the 'errno' variable on several occasions. Foreign functions created with CDLL(..., use_errno=True), when called, swap the values just before the actual function call, and swapped again immediately afterwards. The 'use_errno' parameter defaults to False, in this case 'ctypes_errno' is not touched. The values are also swapped immeditately before and after ctypes callback functions are called, if the callbacks are constructed using the new optional use_errno parameter set to True: CFUNCTYPE(..., use_errno=TRUE) or WINFUNCTYPE(..., use_errno=True). Two new ctypes functions are provided to access the 'ctypes_errno' value from Python: - ctypes.set_errno(value) sets ctypes_errno to 'value', the previous ctypes_errno value is returned. - ctypes.get_errno() returns the current ctypes_errno value. --- On Windows, the same scheme is implemented for the error value which is managed by the GetLastError() and SetLastError() windows api calls. The ctypes functions are 'ctypes.set_last_error(value)' and 'ctypes.get_last_error()', the CDLL and WinDLL optional parameter is named 'use_last_error', defaults to False. --- On Windows, TlsSetValue and TlsGetValue calls are used to provide thread local storage for the variables; ctypes compiled with __GNUC__ uses __thread variables.
* Change all functions that expect one unicode character to accept a pair ofWalter Dörwald2008-06-021-73/+74
| | | | surrogates in narrow builds. Fixes issue #1706460.
* Fix misspelled sys.platform name and misspelled filename.Thomas Heller2008-06-021-1/+1
|
* Fix issue 2782: be less strict about the format string type in strftime.Gregory P. Smith2008-06-021-21/+25
| | | | | Accept unicode and anything else ParseTuple "s#" can deal with. This matches the time.strftime behavior.
* New environment variable PYTHONIOENCODING.Martin v. Löwis2008-06-011-0/+1
|
* Fixed rowcount for SELECT statements. They're -1 now (again), for better ↵Gerhard Häring2008-05-312-15/+11
| | | | DB-API 2.0 compliance.
* Implement heapq in terms of less-than (to match list.sort()).Raymond Hettinger2008-05-311-14/+26
|
* * Mark intermedidate computes values (hi, lo, yr) as volatile.Raymond Hettinger2008-05-301-19/+31
| | | | | | | * Expand comments. * Swap variable names in the sum_exact code so that x and y are consistently chosen as the larger and smaller magnitude values respectively.
* ctypes NULL function pointers have a boolean False value now.Thomas Heller2008-05-291-21/+21
|
* Fix compiler warning.Thomas Heller2008-05-291-1/+1
|
* Fix two typos.Raymond Hettinger2008-05-291-2/+2
|
* Define macros so that this still compiles on Python prior to r63675.Gregory P. Smith2008-05-261-0/+11
|
* Renamed PyString to PyBytesChristian Heimes2008-05-2686-1127/+1127
|
* Patch #1722225: Support QNX 6.Martin v. Löwis2008-05-233-0/+10
|
* Tweak the comments and formatting.Raymond Hettinger2008-05-231-76/+47
|
* Issue #2819: Add math.sum, a function that sums a sequence of floatsMark Dickinson2008-05-231-0/+223
| | | | | efficiently but with no intermediate loss of precision. Based on Raymond Hettinger's ASPN recipe. Thanks Jean Brouwers for the patch.
* bsddb module updated to version 4.7.0Jesus Cea2008-05-222-6/+85
|
* On HPUX, -fPIC must be used for linking. _ctypes now builds on HP-UXThomas Heller2008-05-201-0/+1
| | | | | | | IA64 and PA machines. The ctypes unittests work fine on the IA64, but dump core in test_qsort on the PA.
* Revert copy_reg -> copyreg rename.Georg Brandl2008-05-202-8/+8
|
* issue2858: Fix potential memory corruption when bsddb.db.DBEnv.lock_getGregory P. Smith2008-05-171-21/+22
| | | | | and other bsddb.db object constructors raised an exception. Debugging & patch by Neal Norowitz.
* Added Python 3.0 warning to cPickle.Alexandre Vassalotti2008-05-161-0/+6
|
* #2890: support os.O_ASYNC and fcntl.FASYNC.Georg Brandl2008-05-162-0/+8
|
* Following Amaury's adviceChristian Heimes2008-05-161-1/+1
|
* Fixed #2870: cmathmodule.c compile errorChristian Heimes2008-05-161-1/+1
|
* Deprecate sunaudiodev/SUNAUDIODEV for removal in 3.0.Brett Cannon2008-05-161-0/+4
|
* Deprecate imgfile for removal in 3.0.Brett Cannon2008-05-151-0/+5
|
* Deprecated 'fm' for removal in 3.0.Brett Cannon2008-05-151-0/+5
|
* FL, flp, and fl from IRIX have been deprecated for removal in 3.0.Brett Cannon2008-05-151-0/+5
|
* Deprecate DEVICE, GL, gl, and the related modules cgen and cgensupport for ↵Brett Cannon2008-05-152-0/+8
| | | | removal in 3.0.
* Deprecate CL, CL_old, and cl for 3.0.Brett Cannon2008-05-141-1/+5
|
* The CD and cd modules for IRIX are deprecated for 3.0.Brett Cannon2008-05-141-0/+4
|
* Deprecate al/AL for removal in 3.0.Brett Cannon2008-05-141-0/+4
|
* bsddb module updated to version 4.6.4Jesus Cea2008-05-132-301/+1443
|
* Deprecate the timing module for removal in Python 3.0.Brett Cannon2008-05-121-0/+4
|
* Deprecate the sv module as per PEP 4.Brett Cannon2008-05-121-0/+4
|
* Depreate imageop for removal in 3.0.Brett Cannon2008-05-121-0/+5
|
* Put Lib/lib-old back on to sys.path for module renames.Brett Cannon2008-05-111-1/+4
|
* #1326: document and test zipimporter.archive and zipimporter.prefix.Georg Brandl2008-05-111-2/+9
|
* Added module stub for copy_reg renaming in 3.0.Alexandre Vassalotti2008-05-112-17/+17
| | | | | | Renamed copy_reg to copyreg in the standard library, to avoid spurious warnings and ease later merging to py3k branch. Public documentation remains intact.
* Flesh out the 3.0 deprecation to suggest using the ctypes module.Brett Cannon2008-05-111-1/+1
|
* The linuxaudidev module has been deprecated for removal in Python 3.0.Brett Cannon2008-05-111-0/+4
|
* Deprecate the dl module for removal in 3.0.Brett Cannon2008-05-101-0/+4
|
* Deprecate the bsddb185 module for removal in 3.0.Brett Cannon2008-05-101-0/+4
|
* Deprecate the pure module for 3.0.Brett Cannon2008-05-091-0/+4
|
* Backport fast alternate io.BytesIO implementation.Alexandre Vassalotti2008-05-092-48/+771
| | | | | Merged r62778, r62779, r62802, r62806, r62807, r62808, r62809, r62844, r62846, r62952, r62956.
* Issue #2487. math.ldexp(x, n) raised OverflowError when n was large andMark Dickinson2008-05-091-12/+54
| | | | negative; fix to return an (appropriately signed) zero instead.