Staging
v0.8.1
https://github.com/python/cpython
Revision 77cb7ed40e8f40eace20e7d8eb7ef6a00335dd20 authored by Éric Araujo on 14 August 2010, 02:07:26 UTC, committed by Éric Araujo on 14 August 2010, 02:07:26 UTC
1 parent aa6a939
Raw File
Tip revision: 77cb7ed40e8f40eace20e7d8eb7ef6a00335dd20 authored by Éric Araujo on 14 August 2010, 02:07:26 UTC
Revert regression from r81256 (with release manager approval, see #8688)
Tip revision: 77cb7ed
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