Staging
v0.5.1
https://github.com/python/cpython
Revision 82550d5b8654cee55357cef303038effa4e0448a authored by Tim Peters on 08 April 2003, 19:02:34 UTC, committed by Tim Peters on 08 April 2003, 19:02:34 UTC
backporting fixes so that garbage collection doesn't have to trigger
execution of arbitrary Python code just to figure out whether
an object has a __del__ method.
1 parent 71e300e
Raw File
Tip revision: 82550d5b8654cee55357cef303038effa4e0448a authored by Tim Peters on 08 April 2003, 19:02:34 UTC
Added private API function _PyInstance_Lookup(). This is part of
Tip revision: 82550d5
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"

time_t
PyOS_GetLastModificationTime(char *path, FILE *fp)
{
	struct stat st;
	if (fstat(fileno(fp), &st) != 0)
		return -1;
	else
		return st.st_mtime;
}
back to top