Mercurial > cpython-lru_cache-weakref
view Python/getmtime.c @ 17581:c1937faabb23 2.1
Added support for optional explanation parameter to the \versionadded
macro.
Refactored do_cmd_versionadded() and do_cmd_versionchanged() to do most
of the work in a helper function, with the do_cmd_*() wrappers just supplying
a portion of the replacement text.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Wed, 18 Apr 2001 17:29:14 +0000 |
| parents | 24dafbb0db58 |
| children | 2dea40e40d9d |
line wrap: on
line source
/* Subroutine to get the last modification time of a file */ /* (A separate file because this may be OS dependent) */ #include "Python.h" #include "config.h" time_t PyOS_GetLastModificationTime(char *path, FILE *fp) { struct stat st; if (fstat(fileno(fp), &st) != 0) return -1; else return st.st_mtime; }
