Mercurial > cpython-lru_cache-weakref
view RISCOS/Python/getmtime_riscos.c @ 20010:d03c19db3094 legacy-trunk
Document new file() constructor, with the body of open()'s text, plus a
"new in 2.2" blurb at the end. Replace open()'s text by pointing back
to file().
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Thu, 20 Sep 2001 19:55:29 +0000 |
| parents | a015aed3a1ac |
| children | 2d3cee9f1633 |
line wrap: on
line source
#include <stdio.h> #define __swi #include "osfile.h" long PyOS_GetLastModificationTime(char *path, FILE *fp) { int obj; bits load, exec, ftype; if (xosfile_read_stamped_no_path(path, &obj, &load, &exec, 0, 0, &ftype)) return -1; if (obj != osfile_IS_FILE) return -1; if (ftype == osfile_TYPE_UNTYPED) return -1; load &= 0xFF; load -= 51; if (exec < 1855548004U) load--; exec -= 1855548004U; return exec/100+42949672*load+(95*load)/100; }
