[Patches] [Patch #101006] fix mmapmodule test failures

noreply@sourceforge.net noreply@sourceforge.net
Thu, 27 Jul 2000 19:12:27 -0700


Patch #101006 has been updated. 

Project: 
Category: library
Status: Open
Summary: fix mmapmodule test failures

Follow-Ups:

Date: 2000-Jul-27 19:03
By: mhammond

Comment:
This patch addresses the test_mmap failures on Windows.  Also took the opportunity to clean up the windows code in a few ways.  IMO, the "INT_PTR" casts can also be removed.

This patch:
* Duplicates the mmap file handle, so the Python code can close the file and still allow the mmap file to be resized.
* Ensures that the "tagname" structure element is intialized correctly.
* Ensures that memory is correctly freed in error conditions.
* Ensures we dont call the win32api to free bad resources (we still don't check the results of these functions).

The test code has also been updated to ensure that the resize appears to work - ie, that we can't seek beyond the new size.

This patch has been tested on Windows and Debian 2.2.12

Assigned to Tim, cos he has nothing better to do <wink>.  Im happy to have it assigned back to me for application.
-------------------------------------------------------

Date: 2000-Jul-27 19:12
By: mhammond

Comment:
Added a missing Py_DECREF in error condition, and avoided a non-NULL check when we know damn well it aint NULL!
-------------------------------------------------------

-------------------------------------------------------
For more info, visit:

http://sourceforge.net/patch/?func=detailpatch&patch_id=101006&group_id=5470