summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Patch #1519025 and bug #926423: If a KeyboardInterrupt occurs duringNeal Norwitz2006-08-021-18/+36
| | | | | a socket operation on a socket with a timeout, the exception will be caught correctly. Previously, the exception was not caught.
* v is already checked for NULL, so just DECREF itNeal Norwitz2006-08-021-1/+1
|
* _PyWeakref_GetWeakrefCount() now returns a Py_ssize_t instead of long.Neal Norwitz2006-08-021-3/+3
|
* Prevent memory leak on error.Neal Norwitz2006-08-021-1/+1
| | | | Reported by Klocwork #36
* Speed up PyType_stgdict and PyObject_stgdict.Thomas Heller2006-08-011-2/+11
|
* Minimal useful docstring for CopyComPointer.Thomas Heller2006-08-011-1/+1
|
* Fix a potential segfault and various potentail refcount leaksThomas Heller2006-08-011-15/+13
| | | | in the cast() function.
* Add PyErr_WarnEx() so C code can pass the stacklevel to warnings.warn().Neal Norwitz2006-07-301-4/+6
| | | | | | This provides the proper warning for struct.pack(). PyErr_Warn() is now deprecated in favor of PyErr_WarnEx(). As mentioned by Tim Peters on python-dev.
* Tweak wordingAndrew M. Kuchling2006-07-291-1/+1
|
* Patch #1529514: More openbsd platforms for ctypes.Thomas Heller2006-07-282-84/+58
| | | | | | Regenerated Modules/_ctypes/libffi/configure with autoconf 2.59. Approved by Neal.
* Remove a useless XXX comment.Thomas Heller2006-07-281-7/+7
| | | | | Cosmetic changes to the code so that the #ifdef _UNICODE block doesn't mess emacs code formatting.
* Fix spelling.Georg Brandl2006-07-284-4/+4
|
* Allow socketmodule to compile on NetBSD -current, whose bluetooth APIMatt Fleming2006-07-281-0/+8
| | | | differs from both Linux and FreeBSD. Accepted by Neal Norwitz.
* - pybsddb Bug #1527939: bsddb module DBEnv dbremove and dbrenameGregory P. Smith2006-07-281-3/+3
| | | | | | | methods now allow their database parameter to be None as the sleepycat API allows. Also adds an appropriate test case for DBEnv.dbrename and dbremove.
* defdict_reduce(): Plug leaks.Tim Peters2006-07-281-10/+11
| | | | | | | We didn't notice these before because test_defaultdict didn't actually do anything before Georg fixed that earlier today. Neal's next refleak run then showed test_defaultdict leaking 9 references on each run. That's repaired by this checkin.
* Patch #1520294: Support for getset and member descriptors in types.py,Barry Warsaw2006-07-272-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | inspect.py, and pydoc.py. Specifically, this allows for querying the type of an object against these built-in C types and more importantly, for getting their docstrings printed in the interactive interpreter's help() function. This patch includes a new built-in module called _types which provides definitions of getset and member descriptors for use by the types.py module. These types are exposed as types.GetSetDescriptorType and types.MemberDescriptorType. Query functions are provided as inspect.isgetsetdescriptor() and inspect.ismemberdescriptor(). The implementations of these are robust enough to work with Python implementations other than CPython, which may not have these fundamental types. The patch also includes documentation and test suite updates. I commit these changes now under these guiding principles: 1. Silence is assent. The release manager has not said "no", and of the few people that cared enough to respond to the thread, the worst vote was "0". 2. It's easier to ask for forgiveness than permission. 3. It's so dang easy to revert stuff in svn, that you could view this as a forcing function. :) Windows build patches will follow.
* No functional change. Add comment and assert to describe why there cannot ↵Neal Norwitz2006-07-271-2/+9
| | | | be overflow which was reported by Klocwork. Discussed on python-dev
* Correct error messageAndrew M. Kuchling2006-07-261-1/+1
|
* [Bug #1471938] Fix build problem on Solaris 8 by conditionalizing the use of ↵Andrew M. Kuchling2006-07-261-2/+5
| | | | mvwgetnstr(); it was conditionalized a few lines below. Fix from Paul Eggert. I also tried out the STRICT_SYSV_CURSES case and am therefore removing the 'untested' comment.
* Part of bug #1523610: fix miscalculation of buffer length.Georg Brandl2006-07-261-0/+11
| | | | | Also add a guard against NULL in converttuple and add a test case (that previously would have crashed).
* Bug #1524310: Properly report errors from FindNextFile in os.listdir.Martin v. Löwis2006-07-241-0/+17
| | | | Will backport to 2.4.
* 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.