Staging
v0.5.1
https://github.com/python/cpython
Revision cf0d8ab818852503057b8ade6cccc403fbb5d2be authored by Barry Warsaw on 23 May 2011, 19:22:56 UTC, committed by Barry Warsaw on 23 May 2011, 19:22:56 UTC
message:

Reconcile with the 2.6svn branch.  The 2.6.7 release will be made from
Subversion, but there were differences, so this brings them in sync.  These
changes should *not* propagate to any newer versions.
1 parent e26bc10
Raw File
Tip revision: cf0d8ab818852503057b8ade6cccc403fbb5d2be authored by Barry Warsaw on 23 May 2011, 19:22:56 UTC
Replay changeset 70238:03e488b5c009 from fubar branch. Original commit
Tip revision: cf0d8ab
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