Staging
v0.5.1
https://github.com/python/cpython
Revision cd3b74d4e860b75bc45658ade0d412274054648f authored by Hirokazu Yamamoto on 20 August 2008, 16:15:28 UTC, committed by Hirokazu Yamamoto on 20 August 2008, 16:15:28 UTC
1 parent f840296
Raw File
Tip revision: cd3b74d4e860b75bc45658ade0d412274054648f authored by Hirokazu Yamamoto on 20 August 2008, 16:15:28 UTC
Reverted r65900. See http://mail.python.org/pipermail/python-checkins/2008-August/073116.html
Tip revision: cd3b74d
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