summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* SF#1534630Fredrik Lundh2006-08-161-1/+5
| | | | ignore data that arrives before the opening start tag
* Remove the special casing of Py_None when converting the return valueThomas Heller2006-08-161-1/+1
| | | | | | | | | | of the Python part of a callback function to C. If it cannot be converted, call PyErr_WriteUnraisable with the exception we got. Before, arbitrary data has been passed to the calling C code in this case. (I'm not really sure the NEWS entry is understandable, but I cannot find better words)
* The __repr__ method of a NULL py_object does no longer raise anThomas Heller2006-08-161-1/+1
| | | | | | | exception. Remove a stray '?' character from the exception text when the value is retrieved of such an object. Includes tests.
* Add commented assert statements to check that the result ofThomas Heller2006-08-161-20/+36
| | | | | | | | PyObject_stgdict() and PyType_stgdict() calls are non-NULL before dereferencing the result. Hopefully this fixes what klocwork is complaining about. Fix a few other nits as well.
* Check for NULL return value from new_CArgObject calls.Thomas Heller2006-08-151-0/+6
|
* Patch #1511317: don't crash on invalid hostname infoGeorg Brandl2006-08-141-11/+14
|
* Patch #1535500: fix segfault in BZ2File.writelines and make sure itGeorg Brandl2006-08-141-2/+17
| | | | raises the correct exceptions.
* Patch #1536908: Add support for AMD64 / OpenBSD.Thomas Heller2006-08-143-3/+2
| | | | | Remove the -no-stack-protector compiler flag for OpenBSD as it has been reported to be unneeded.
* Apply the patch #1532975 plus ideas from the patch #1533481.Thomas Heller2006-08-143-162/+182
| | | | | | | | | | | | | | ctypes instances no longer have the internal and undocumented '_as_parameter_' attribute which was used to adapt them to foreign function calls; this mechanism is replaced by a function pointer in the type's stgdict. In the 'from_param' class methods, try the _as_parameter_ attribute if other conversions are not possible. This makes the documented _as_parameter_ mechanism work as intended. Change the ctypes version number to 1.0.1.
* Revert the change that tries to zero out a closure's result storageThomas Heller2006-08-141-15/+5
| | | | area because the size if unknown in source/callproc.c.
* Check for NULL return value of GenericCData_new().Thomas Heller2006-08-141-0/+4
| | | | Fixes klockwork issues #188, #189.
* Check for NULL return value from new_CArgObject().Thomas Heller2006-08-141-0/+6
| | | | Fixes klockwork issues #183, #184, #185.
* Remove unused, buggy test function.Thomas Heller2006-08-141-12/+0
| | | | Fixes klockwork issue #207.
* Get rid of compiler warningNeal Norwitz2006-08-131-2/+2
|
* Handle alloca failures.Neal Norwitz2006-08-132-0/+15
| | | | Klocwork 225-228
* Really address the issue of where to place the assert for leftblock.Neal Norwitz2006-08-131-1/+1
| | | | (Followup of Klocwork 274)
* Handle failure from PyModule_GetDict() (Klocwork 208).Neal Norwitz2006-08-131-9/+15
| | | | | Fix a bunch of refleaks in the init of the module. This would only be found when running python -v.
* Handle failures from lookup.Neal Norwitz2006-08-131-0/+4
| | | | Klocwork 341-342
* It's very unlikely, though possible that source is not a string. VerifyNeal Norwitz2006-08-131-0/+3
| | | | | | | that PyString_AsString() returns a valid pointer. (The problem can arise when zlib.decompress doesn't return a string.) Klocwork 346
* Handle malloc and fopen failures more gracefully.Neal Norwitz2006-08-131-2/+8
| | | | Klocwork 180-181
* Check return result of PyModule_GetDict().Neal Norwitz2006-08-131-22/+24
| | | | | Fix a bunch of refleaks in the init of the module. This would only be found when running python -v.
* Patch #1538606, Patch to fix __index__() clipping.Neal Norwitz2006-08-123-40/+14
| | | | | | | I modified this patch some by fixing style, some error checking, and adding XXX comments. This patch requires review and some changes are to be expected. I'm checking in now to get the greatest possible review and establish a baseline for moving forward. I don't want this to hold up release if possible.
* Verify verdat which is returned from malloc is not NULL.Neal Norwitz2006-08-121-4/+13
| | | | | | Ensure we don't pass NULL to free. Klocwork #306 (at least the first part, checking malloc)
* Don't deref v if it's NULL.Neal Norwitz2006-08-121-2/+4
| | | | Klocwork #214
* Check returned pointer is valid.Neal Norwitz2006-08-121-0/+6
| | | | Klocwork #233
* I'm not sure why this code allocates this string for the error message.Neal Norwitz2006-08-121-2/+11
| | | | | | | I think it would be better to always use snprintf and have the format limit the size of the name appropriately (like %.200s). Klocwork #340
* Try to handle a malloc failure. I'm not entirely sure this is correct.Neal Norwitz2006-08-121-0/+3
| | | | | | There might be something else we need to do to handle the exception. Klocwork # 212-213
* Move the assert which checks for a NULL pointer first.Neal Norwitz2006-08-121-1/+1
| | | | Klocwork #274.
* If _stat_float_times is false, we will try to INCREF ival which could be NULL.Neal Norwitz2006-08-121-0/+2
| | | | | | | Return early in that case. The caller checks for PyErr_Occurred so this should be ok. Klocwork #297
* Klocwork made another run and found a bunch more problems.Neal Norwitz2006-08-124-2/+12
| | | | | | | This is the first batch of fixes that should be easy to verify based on context. This fixes problem numbers: 220 (ast), 323-324 (symtable), 321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).
* When a ctypes C callback function is called, zero out the resultThomas Heller2006-08-111-7/+17
| | | | | | | | storage before converting the result to C data. See the comment in the code for details. Provide a better context for errors when the conversion of a callback function's result cannot be converted.
* Update dangling references to the 3.2 database toMartin v. Löwis2006-08-101-5/+5
| | | | mention that this is UCD 4.1 now.
* Bug #1535081: A leading underscore has been added to the names ofGeorg Brandl2006-08-061-5/+8
| | | | the md5 and sha modules, so add it in Modules/Setup.dist too.
* Fix #1530559, struct.pack raises TypeError where it used to convert.Bob Ippolito2006-08-041-0/+60
| | | | | Passing float arguments to struct.pack when integers are expected now triggers a DeprecationWarning.
* Change fix for segfaulting property(), add a NEWS entry and a test.Georg Brandl2006-08-041-0/+9
|
* Correction of patch #1455898: In the mbcs decoder, set final=FalseMartin v. Löwis2006-08-021-1/+1
| | | | for stream decoder, but final=True for the decode function.
* 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.