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...
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to