summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Ensure we don't write beyond errText. I think I got this right, butNeal Norwitz2006-07-231-10/+19
| | | | | | | | | it definitely could use some review to ensure I'm not off by one and there's no possible overflow/wrap-around of bytes_left. Reported by Klocwork #1. Fix a problem if there is a failure allocating self->db. Found with failmalloc.
* nextlink can be NULL if teedataobject_new fails, so use XINCREF.Neal Norwitz2006-07-231-2/+8
| | | | | | Ensure that dataobj is never NULL. Reported by Klocwork #102
* Fix memory leaks spotted by Klocwork #37.Neal Norwitz2006-07-231-2/+2
|
* Check the allocation of b_objects and return if there was a failure.Neal Norwitz2006-07-231-2/+11
| | | | | | | | | | Also fix a few memory leaks in other failure scenarios. It seems that if b_objects == Py_None, we will have an extra ref to b_objects. Add XXX comment so hopefully someone documents why the else isn't necessary or adds it in. Reported by Klocwork #20
* Fix more memory allocation issues found with failmalloc.Neal Norwitz2006-07-222-12/+29
|
* Remove an XXX marker in a comment.Brett Cannon2006-07-211-1/+1
|
* Make sure the _ctypes extension can be compiled when WITH_THREAD isThomas Heller2006-07-192-0/+6
| | | | | not defined on Windows, even if that configuration is probably not supported at all.
* Fix bug #1520914. Starting in 2.4, time.strftime() began to check the boundsBrett Cannon2006-07-181-4/+28
| | | | | | | of values in the time tuple passed in. Unfortunately people came to rely on undocumented behaviour of setting unneeded values to 0, regardless of if it was within the valid range. Now those values force the value internally to the minimum value when 0 is passed in.
* Fix memory leaks in some conditions.Neal Norwitz2006-07-161-9/+11
| | | | Reported by Klocwork #152.
* proto was dereffed above and is known to be good. No need for X.Neal Norwitz2006-07-161-1/+1
| | | | Reported by Klocwork, #39.
* self is dereffed (and passed as first arg), so it's known to be good.Neal Norwitz2006-07-161-2/+2
| | | | | | func is returned from PyArg_ParseTuple and also dereffed. Reported by Klocwork, #30 (self one at least).
* Patch #1521817: The index range checking on ctypes arrays containingThomas Heller2006-07-141-10/+8
| | | | exactly one element is enabled again.
* Make the prototypes of our private PyUnicode_FromWideChar andThomas Heller2006-07-142-5/+6
| | | | | PyUnicode_AsWideChar replacement functions compatible to the official functions by using Py_ssize_t instead of int.
* A misspelled preprocessor symbol caused ctypes to be always compiledThomas Heller2006-07-133-11/+11
| | | | without thread support. Replaced WITH_THREADS with WITH_THREAD.
* Accept long options "--help" and "--version".Georg Brandl2006-07-121-3/+4
|
* Fix function name in error msgNeal Norwitz2006-07-121-1/+1
|
* Change the ctypes version number to 1.0.0.Thomas Heller2006-07-111-1/+1
|
* #1494314: Fix a regression with high-numbered sockets in 2.4.3. ThisAnthony Baxter2006-07-112-17/+72
| | | | | means that select() on sockets > FD_SETSIZE (typically 1024) work again. The patch makes sockets use poll() internally where available.
* Assigning None to pointer type structure fields possible overwroteThomas Heller2006-07-101-1/+1
| | | | wrong fields.
* Fixed a segfault when ctypes.wintypes were imported onThomas Heller2006-07-101-2/+9
| | | | non-Windows machines.
* Fix bug #1518190: accept any integer or long value in theThomas Heller2006-07-101-8/+19
| | | | ctypes.c_void_p constructor.
* Patch #1516912: improve Modules support for OpenVMS.Neal Norwitz2006-07-108-63/+152
|
* Patch #1517790: It is now possible to use custom objects in the ctypesThomas Heller2006-07-061-3/+2
| | | | | | foreign function argtypes sequence as long as they provide a from_param method, no longer is it required that the object is a ctypes type.
* Revert the change done in svn revision 47206:Thomas Heller2006-07-061-14/+0
| | | | | | Add a new function uses_seh() to the _ctypes extension module. This will return True if Windows Structured Exception handling (SEH) is used when calling functions, False otherwise.
* - back out Expat change; the final fix to Expat will be differentFred Drake2006-07-062-3/+31
| | | | | - change the pyexpat wrapper to not be so sensitive to this detail of the Expat implementation (the ex-crasher test still passes)
* Fix the bitfield test when _ctypes is compiled with MingW. StructuresThomas Heller2006-07-051-2/+2
| | | | containing bitfields may have different layout on MSVC and MingW .
* Sync the darwin/x86 port libffi with the copy in PyObjC. This fixes a numberRonald Oussoren2006-07-042-84/+116
| | | | | | | | of bugs in that port. The most annoying ones were due to some subtle differences between the document ABI and the actual implementation :-( (there are no python unittests that fail without this patch, but without it some of libffi's unittests fail).
* Fix build problems with the platform SDK on windows. It is not sufficient ↵Kristján Valur Jónsson2006-07-031-1/+1
| | | | to test for the C compiler version when determining if we have the secure CRT from microsoft. Must test with an undocumented macro, __STDC_SECURE_LIB__ too.
* Add a new function uses_seh() to the _ctypes extension module. ThisThomas Heller2006-07-031-0/+14
| | | | | | | | | | | | will return True if Windows Structured Exception handling (SEH) is used when calling functions, False otherwise. Currently, only MSVC supports SEH. Fix the test so that it doesn't crash when run with MingW compiled _ctypes. Note that two tests are still failing when mingw is used, I suspect structure layout differences and function calling conventions between MSVC and MingW.
* Fixes so that _ctypes can be compiled with the MingW compiler.Thomas Heller2006-07-032-6/+4
| | | | | | | It seems that the definition of '__attribute__(x)' was responsible for the compiler ignoring the '__fastcall' attribute on the ffi_closure_SYSV function in libffi_msvc/ffi.c, took me quite some time to figure this out.
* Cleanup: Remove commented out code.Thomas Heller2006-07-031-22/+1
|
* Correct arithmetic in access on Win32. Fixes #1513646.Martin v. Löwis2006-07-021-1/+1
|
* The sqlite3 module did cut off data from the SQLite database at the first nullGerhard Häring2006-07-022-3/+4
| | | | character before sending it to a custom converter. This has been fixed now.
* SF bug #1296433 (Expat bug #1515266): Unchecked calls to character dataFred Drake2006-07-011-0/+2
| | | | | | | | handler would cause a segfault. This merges in Expat's lib/xmlparse.c revisions 1.154 and 1.155, which fix this and a closely related problem (the later does not affect Python). Moved the crasher test to the tests for xml.parsers.expat.
* Remove now-unused fidding with PY_FORMAT_SIZE_T.Tim Peters2006-06-301-4/+0
|
* Revert the use of PY_FORMAT_SIZE_T in PyErr_Format.Thomas Heller2006-06-301-1/+5
|
* Silence compiler warningNeal Norwitz2006-06-301-1/+6
|
* Protect the thread api calls in the _ctypes extension module withinThomas Heller2006-06-293-1/+22
| | | | #ifdef WITH_THREADS/#endif blocks. Found by Sam Rushing.
* Fix bug #1512695: cPickle.loads could crash if it was interrupted withNeal Norwitz2006-06-281-2/+6
| | | | | | a KeyboardInterrupt since PyTuple_Pack was passed a NULL. Will backport.
* [ 1295808 ] expat symbols should be namespaced in pyexpatv2.5b1Trent Mick2006-06-192-0/+128
| | | | (http://python.org/sf/1295808)
* Upgrade pyexpat to expat 2.0.0 (http://python.org/sf/1462338).Trent Mick2006-06-1911-308/+363
|
* Fixed a memory leak that was introduced with incorrect usage of the Python weakGerhard Häring2006-06-192-2/+2
| | | | | | reference API in pysqlite 2.2.1. Bumbed pysqlite version number to upcoming pysqlite 2.3.1 release.
* Patch #1506645: add Python wrappers for the curses functionsWalter Dörwald2006-06-191-1/+66
| | | | | is_term_resized, resize_term and resizeterm. This uses three separate configure checks (one for each function).
* Fix memory leak reported by valgrind while running test_subprocessNeal Norwitz2006-06-171-0/+2
|
* Speculative checkin (requires approval of Gerhard Haering)Neal Norwitz2006-06-151-0/+2
| | | | | | | | | This backs out the test changes in 46962 which prevented crashes by not running the tests via a version check. All the version checks added in that rev were removed from the tests. Code was added to the error handler in connection.c that seems to work with older versions of sqlite including 3.1.3.
* - Added version checks in C code to make sure we don't trigger bugs in olderGerhard Häring2006-06-141-4/+15
| | | | | | | | | | | SQLite versions. - Added version checks in test suite so that we don't execute tests that we know will fail with older (buggy) SQLite versions. Now, all tests should run against all SQLite versions from 3.0.8 until 3.3.6 (latest one now). The sqlite3 module can be built against all these SQLite versions and the sqlite3 module does its best to not trigger bugs in SQLite, but using SQLite 3.3.3 or later is recommended.
* Patch #1455898: Incremental mode for "mbcs" codec.Martin v. Löwis2006-06-141-5/+10
|
* Merged changes from external pysqlite 2.3.0 release. Documentation updates willGerhard Häring2006-06-134-58/+266
| | | | follow in a few hours at the latest. Then we should be ready for beta1.
* Remove unused variable.Brett Cannon2006-06-131-1/+0
|
* Patch #1454481: Make thread stack size runtime tunable.Andrew MacIntyre2006-06-131-0/+58
| | | | | | | | | | 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).