Mercurial > cpython-lru_cache-weakref
view Python/getplatform.c @ 62189:d281ed59ff0b
sys_pyfile_write() does nothing if file is NULL
mywrite() falls back to the C file object if sys_pyfile_write() returns an
error. This patch fixes a segfault is Py_FatalError() is called in an early
stage of Python initialization.
| author | Victor Stinner <victor.stinner@haypocalc.com> |
|---|---|
| date | Tue, 08 Jun 2010 20:46:00 +0000 |
| parents | 6f6f965c5e2d |
| children |
line wrap: on
line source
#include "Python.h" #ifndef PLATFORM #define PLATFORM "unknown" #endif const char * Py_GetPlatform(void) { return PLATFORM; }
