Update of /cvsroot/python/python/dist/src/Modules In directory slayer.i.sourceforge.net:/tmp/cvs-serv27974/Modules Modified Files: mmapmodule.c Log Message: - added (long) casts to a couple of Py_BuildValue calls, just for the sake of it. note that this only covers the unlikely case that size_t is smaller than a long; it's probably more likely that there are platforms out there where size_t is *larger* than a long, and mmapmodule cannot really deal with that today. Index: mmapmodule.c =================================================================== RCS file: /cvsroot/python/python/dist/src/Modules/mmapmodule.c,v retrieving revision 2.18 retrieving revision 2.19 diff -C2 -r2.18 -r2.19 *** mmapmodule.c 2000/07/08 22:05:01 2.18 --- mmapmodule.c 2000/07/09 13:16:13 2.19 *************** *** 261,268 **** if (self->file_handle != (INT_PTR) -1) { return (Py_BuildValue ( ! "l", GetFileSize ((HANDLE)self->file_handle, NULL))); } else { ! return (Py_BuildValue ("l", self->size) ); } #endif /* MS_WIN32 */ --- 261,268 ---- if (self->file_handle != (INT_PTR) -1) { return (Py_BuildValue ( ! "l", (long) GetFileSize ((HANDLE)self->file_handle, NULL))); } else { ! return (Py_BuildValue ("l", (long) self->size) ); } #endif /* MS_WIN32 */ *************** *** 275,279 **** return NULL; } ! return (Py_BuildValue ("l", buf.st_size) ); } #endif /* UNIX */ --- 275,279 ---- return NULL; } ! return (Py_BuildValue ("l", (long) buf.st_size) ); } #endif /* UNIX */ *************** *** 372,376 **** if (!PyArg_ParseTuple(args, ":tell")) return NULL; ! return (Py_BuildValue ("l", self->pos) ); } --- 372,376 ---- if (!PyArg_ParseTuple(args, ":tell")) return NULL; ! return (Py_BuildValue ("l", (long) self->pos) ); } *************** *** 389,394 **** } else { #ifdef MS_WIN32 ! return (Py_BuildValue ( ! "l", FlushViewOfFile (self->data+offset, size))); #endif /* MS_WIN32 */ #ifdef UNIX --- 389,394 ---- } else { #ifdef MS_WIN32 ! return (Py_BuildValue("l", (long) ! FlushViewOfFile(self->data+offset, size))); #endif /* MS_WIN32 */ #ifdef UNIX *************** *** 401,405 **** return NULL; } ! return Py_BuildValue ("l", 0); #endif /* UNIX */ } --- 401,405 ---- return NULL; } ! return Py_BuildValue ("l", (long) 0); #endif /* UNIX */ }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4