view Python/getmtime.c @ 50640:368df0060740 3.0

Blocked revisions 68417 via svnmerge ................ r68417 | tarek.ziade | 2009-01-09 01:15:45 +0100 (Fri, 09 Jan 2009) | 9 lines Merged revisions 68415 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r68415 | tarek.ziade | 2009-01-09 00:56:31 +0100 (Fri, 09 Jan 2009) | 1 line fixed #4394 make the storage of the password optional in .pypirc ........ ................
author Tarek Ziadé <ziade.tarek@gmail.com>
date Fri, 09 Jan 2009 00:17:40 +0000
parents f731859e9b3b
children
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 "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