Staging
v0.5.1
https://github.com/python/cpython
Revision afa4140d9c50b9136b157f6792329d3e5e9dac0a authored by Benjamin Peterson on 24 February 2010, 02:26:59 UTC, committed by Benjamin Peterson on 24 February 2010, 02:26:59 UTC
svn+ssh://pythondev@svn.python.org/python/trunk

................
  r78408 | benjamin.peterson | 2010-02-23 20:24:35 -0600 (Tue, 23 Feb 2010) | 9 lines

  Merged revisions 78407 via svnmerge from
  svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

  ........
    r78407 | benjamin.peterson | 2010-02-23 20:21:34 -0600 (Tue, 23 Feb 2010) | 1 line

    rewrite test to not rely on __doc__ being present
  ........
................
1 parent 24988ab
Raw File
Tip revision: afa4140d9c50b9136b157f6792329d3e5e9dac0a authored by Benjamin Peterson on 24 February 2010, 02:26:59 UTC
Merged revisions 78408 via svnmerge from
Tip revision: afa4140
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