Reading through Modules/mmapmodule.c to work on some documentation I encountered this: 24 #ifndef MS_WINDOWS 25 #define UNIX 26 #endif 536 #ifdef MS_WINDOWS 537 return PyInt_FromLong((long) FlushViewOfFile(self->data+offset, siz e)); 538 #elif defined(UNIX) 539 /* XXX semantics of return value? */ 540 /* XXX flags for msync? */ 541 if (-1 == msync(self->data + offset, size, MS_SYNC)) { 542 PyErr_SetFromErrno(mmap_module_error); 543 return NULL; 544 } 545 return PyInt_FromLong(0); 546 #else 547 PyErr_SetString(PyExc_ValueError, "flush not supported on this syst em"); 548 return NULL; 549 #endif The #else will never be reached, unless I read it wrongly? -- Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai イェルーン ラウフロック ヴァン デル ウェルヴェン http://www.in-nomine.org/ | http://www.rangaku.org/ Once sent from the Golden Hall...
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