--- Python\orig\dynload_win.c Wed Jun 11 02:22:46 2008 +++ Python\dynload_win.c Wed Dec 17 00:25:27 2008 @@ -205,21 +205,21 @@ theLength = FormatMessageW( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, /* flags */ NULL, /* message source */ errorCode, /* the message (error) ID */ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default language */ theInfo, /* the buffer */ - sizeof(theInfo), /* the buffer size */ + sizeof(theInfo) / sizeof(theInfo[0]), /* size in wchars */ NULL); /* no additional format args. */ /* Problem: could not get the error message. This should not happen if called correctly. */ if (theLength == 0) { message = PyUnicode_FromFormat( "DLL load failed with error code %d", errorCode); } else { /* For some reason a \r\n --- Python\orig\pythonrun.c Sat Nov 22 17:18:04 2008 +++ Python\pythonrun.c Sat Dec 13 02:15:03 2008 @@ -319,21 +319,21 @@ PyObject *tmp; if (fout != NULL && fout != Py_None) { tmp = PyObject_CallMethod(fout, "flush", ""); if (tmp == NULL) PyErr_Clear(); else Py_DECREF(tmp); } - if (ferr != NULL || ferr != Py_None) { + if (ferr != NULL && ferr != Py_None) { tmp = PyObject_CallMethod(ferr, "flush", ""); if (tmp == NULL) PyErr_Clear(); else Py_DECREF(tmp); } } /* Undo the effect of Py_Initialize(). --- PC\bdist_wininst\orig\extract.c Wed Jul 14 11:17:04 2004 +++ PC\bdist_wininst\extract.c Sat Dec 13 02:19:46 2008 @@ -120,21 +120,21 @@ no sense */ CloseHandle(hFile); return NULL; } hFileMapping = CreateFileMapping(hFile, NULL, PAGE_READWRITE, 0, size, NULL); CloseHandle(hFile); - if (hFileMapping == INVALID_HANDLE_VALUE) { + if (hFileMapping == NULL) { if (notify) notify(SYSTEM_ERROR, "CreateFileMapping (%s)", filename); return NULL; } dst = MapViewOfFile(hFileMapping, FILE_MAP_WRITE, 0, 0, 0); CloseHandle(hFileMapping); --- PC\bdist_wininst\orig\install.c Tue Jul 15 22:02:25 2008 +++ PC\bdist_wininst\install.c Wed Dec 17 00:29:44 2008 @@ -924,21 +924,21 @@ GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) return NULL; nSizeLow = GetFileSize(hFile, &nSizeHigh); hFileMapping = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL); CloseHandle(hFile); - if (hFileMapping == INVALID_HANDLE_VALUE) + if (hFileMapping == NULL) return NULL; data = MapViewOfFile(hFileMapping, FILE_MAP_READ, 0, 0, 0); CloseHandle(hFileMapping); *psize = nSizeLow; return data; }