Staging
v0.8.1
https://github.com/python/cpython
Revision 2fafa251dba5df1f90326a825ac6de2b6b906bc3 authored by Andrew M. Kuchling on 09 October 2006, 18:42:49 UTC, committed by Andrew M. Kuchling on 09 October 2006, 18:42:49 UTC
Fix problems found by Coverity.

longobject.c: also fix an ssize_t problem
  <a> could have been NULL, so hoist the size calc to not use <a>.

[The ssize_t change isn't needed for 2.4.  The other changes in this revision
 are to modules not present in 2.4. --amk]
1 parent cebdc5e
Raw File
Tip revision: 2fafa251dba5df1f90326a825ac6de2b6b906bc3 authored by Andrew M. Kuchling on 09 October 2006, 18:42:49 UTC
[Partial backport of r45947 | neal.norwitz]
Tip revision: 2fafa25
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