A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-April/078671.html below:

[Python-Dev] Unreachable code in mmapmodule.c?

[Python-Dev] Unreachable code in mmapmodule.c? [Python-Dev] Unreachable code in mmapmodule.c?Jeroen Ruigrok van der Werven asmodai at in-nomine.org
Wed Apr 16 15:11:13 CEST 2008
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...
More information about the Python-Dev mailing list

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