Staging
v0.5.1
https://github.com/python/cpython
Revision 90a732c23c7a06e6073419f058a9852e9aa87b1b authored by Ezio Melotti on 03 August 2010, 06:13:35 UTC, committed by Ezio Melotti on 03 August 2010, 06:13:35 UTC
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79156 | florent.xicluna | 2010-03-21 00:21:02 +0200 (Sun, 21 Mar 2010) | 2 lines

  Cleanup test_struct using check_warnings.
........
1 parent 5eaf67b
Raw File
Tip revision: 90a732c23c7a06e6073419f058a9852e9aa87b1b authored by Ezio Melotti on 03 August 2010, 06:13:35 UTC
Merged revisions 79156 via svnmerge from
Tip revision: 90a732c
getmtime.c

/* Subroutine to get the last modification time of a file */

/* (A separate file because this may be OS dependent) */

#include "Python.h"
#include "pyconfig.h"

#ifdef __cplusplus
extern "C" {
#endif

time_t
PyOS_GetLastModificationTime(char *path, FILE *fp)
{
	struct stat st;
	if (fstat(fileno(fp), &st) != 0)
		return -1;
	else
		return st.st_mtime;
}

#ifdef __cplusplus
}
#endif

back to top