Staging
v0.5.1
https://github.com/python/cpython
Revision 5e4f5896e1e4769b1efa76c31ab2ef00d29a373f authored by Fred Drake on 10 November 2003, 14:42:58 UTC, committed by Fred Drake on 10 November 2003, 14:42:58 UTC
1 parent 3fe64a4
Raw File
Tip revision: 5e4f5896e1e4769b1efa76c31ab2ef00d29a373f authored by Fred Drake on 10 November 2003, 14:42:58 UTC
add missing "if"
Tip revision: 5e4f589
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"

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