diff options
-rw-r--r-- | Doc/c-api/sys.rst | 7 | ||||
-rw-r--r-- | Doc/data/refcounts.dat | 3 | ||||
-rw-r--r-- | Makefile.pre.in | 1 | ||||
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | PC/VC6/pythoncore.dsp | 4 | ||||
-rw-r--r-- | PC/VS7.1/pythoncore.vcproj | 3 | ||||
-rw-r--r-- | PC/VS8.0/pythoncore.vcproj | 4 | ||||
-rw-r--r-- | PC/os2emx/Makefile | 1 | ||||
-rw-r--r-- | PC/os2emx/python27.def | 3 | ||||
-rw-r--r-- | PC/os2vacpp/makefile | 2 | ||||
-rw-r--r-- | PC/os2vacpp/makefile.omk | 2 | ||||
-rw-r--r-- | PC/os2vacpp/python.def | 1 | ||||
-rw-r--r-- | PCbuild/pythoncore.vcproj | 4 | ||||
-rw-r--r-- | Python/getmtime.c | 26 | ||||
-rw-r--r-- | Python/import.c | 2 | ||||
-rw-r--r-- | RISCOS/Makefile | 1 | ||||
-rw-r--r-- | RISCOS/Python/getmtime_riscos.c | 20 |
17 files changed, 2 insertions, 84 deletions
diff --git a/Doc/c-api/sys.rst b/Doc/c-api/sys.rst index 7696811..f5d2ab0 100644 --- a/Doc/c-api/sys.rst +++ b/Doc/c-api/sys.rst @@ -15,13 +15,6 @@ Operating System Utilities one of the strings ``'<stdin>'`` or ``'???'``. -.. cfunction:: long PyOS_GetLastModificationTime(char *filename) - - Return the time of last modification of the file *filename*. The result is - encoded in the same way as the timestamp returned by the standard C library - function :cfunc:`time`. - - .. cfunction:: void PyOS_AfterFork() Function to update some internal state after a process fork; this should be diff --git a/Doc/data/refcounts.dat b/Doc/data/refcounts.dat index 4d889bd..c8633c0 100644 --- a/Doc/data/refcounts.dat +++ b/Doc/data/refcounts.dat @@ -841,9 +841,6 @@ PyNumber_Xor:PyObject*::+1: PyNumber_Xor:PyObject*:o1:0: PyNumber_Xor:PyObject*:o2:0: -PyOS_GetLastModificationTime:long::: -PyOS_GetLastModificationTime:char*:filename:: - PyObject_AsFileDescriptor:int::: PyObject_AsFileDescriptor:PyObject*:o:0: diff --git a/Makefile.pre.in b/Makefile.pre.in index 83824ec..1b2bcfe 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -264,7 +264,6 @@ PYTHON_OBJS= \ Python/getargs.o \ Python/getcompiler.o \ Python/getcopyright.o \ - Python/getmtime.o \ Python/getplatform.o \ Python/getversion.o \ Python/graminit.o \ @@ -12,6 +12,8 @@ What's New in Python 2.7 alpha 1 Core and Builtins ----------------- +- Issue #4817: Remove unused function PyOS_GetLastModificationTime. + - Issue #4075: Use OutputDebugStringW in Py_FatalError. - Issue #4797: IOError.filename was not set when _fileio.FileIO failed to open diff --git a/PC/VC6/pythoncore.dsp b/PC/VC6/pythoncore.dsp index 5a89a44..756e271 100644 --- a/PC/VC6/pythoncore.dsp +++ b/PC/VC6/pythoncore.dsp @@ -410,10 +410,6 @@ SOURCE=..\..\Python\getcopyright.c # End Source File
# Begin Source File
-SOURCE=..\..\Python\getmtime.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\Python\getopt.c
# End Source File
# Begin Source File
diff --git a/PC/VS7.1/pythoncore.vcproj b/PC/VS7.1/pythoncore.vcproj index c2ccebb..601bfa0 100644 --- a/PC/VS7.1/pythoncore.vcproj +++ b/PC/VS7.1/pythoncore.vcproj @@ -569,9 +569,6 @@ RelativePath="..\..\Python\getcopyright.c"> </File> <File - RelativePath="..\..\Python\getmtime.c"> - </File> - <File RelativePath="..\..\Python\getopt.c"> </File> <File diff --git a/PC/VS8.0/pythoncore.vcproj b/PC/VS8.0/pythoncore.vcproj index 4720a2f..d1be268 100644 --- a/PC/VS8.0/pythoncore.vcproj +++ b/PC/VS8.0/pythoncore.vcproj @@ -1687,10 +1687,6 @@ > </File> <File - RelativePath="..\..\Python\getmtime.c" - > - </File> - <File RelativePath="..\..\Python\getopt.c" > </File> diff --git a/PC/os2emx/Makefile b/PC/os2emx/Makefile index 9bfd927..82d548e 100644 --- a/PC/os2emx/Makefile +++ b/PC/os2emx/Makefile @@ -351,7 +351,6 @@ SRC.PYTHON= $(addprefix $(TOP), \ Python/getargs.c \ Python/getcompiler.c \ Python/getcopyright.c \ - Python/getmtime.c \ Python/getplatform.c \ Python/getversion.c \ Python/graminit.c \ diff --git a/PC/os2emx/python27.def b/PC/os2emx/python27.def index e41303d..1a258e7 100644 --- a/PC/os2emx/python27.def +++ b/PC/os2emx/python27.def @@ -931,9 +931,6 @@ EXPORTS ; From python27_s.lib(getcopyright) "Py_GetCopyright" -; From python27_s.lib(getmtime) - "PyOS_GetLastModificationTime" - ; From python27_s.lib(getplatform) "Py_GetPlatform" diff --git a/PC/os2vacpp/makefile b/PC/os2vacpp/makefile index c75bec3..1608960 100644 --- a/PC/os2vacpp/makefile +++ b/PC/os2vacpp/makefile @@ -1693,8 +1693,6 @@ getcopyright.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ $(PY_INCLUDE)\stringobject.h $(PY_INCLUDE)\sysmodule.h $(PY_INCLUDE)\traceback.h \ $(PY_INCLUDE)\tupleobject.h -getmtime.obj: pyconfig.h - getplatform.obj: $(PY_INCLUDE)\abstract.h $(PY_INCLUDE)\ceval.h \ $(PY_INCLUDE)\classobject.h $(PY_INCLUDE)\cobject.h $(PY_INCLUDE)\complexobject.h \ pyconfig.h $(PY_INCLUDE)\dictobject.h $(PY_INCLUDE)\fileobject.h \ diff --git a/PC/os2vacpp/makefile.omk b/PC/os2vacpp/makefile.omk index e291627..a380c03 100644 --- a/PC/os2vacpp/makefile.omk +++ b/PC/os2vacpp/makefile.omk @@ -1155,8 +1155,6 @@ getcopyright.obj: abstract.h ceval.h classobject.h cobject.h \ pystate.h python.h pythonrun.h rangeobject.h sliceobject.h \ stringobject.h sysmodule.h traceback.h tupleobject.h -getmtime.obj: pyconfig.h - getplatform.obj: abstract.h ceval.h classobject.h cobject.h complexobject.h \ pyconfig.h dictobject.h fileobject.h floatobject.h funcobject.h \ import.h intobject.h intrcheck.h listobject.h longobject.h \ diff --git a/PC/os2vacpp/python.def b/PC/os2vacpp/python.def index 79d05b0..ba0dfd6 100644 --- a/PC/os2vacpp/python.def +++ b/PC/os2vacpp/python.def @@ -284,7 +284,6 @@ EXPORTS PyNumber_Xor PyOS_AfterFork PyOS_FiniInterrupts - PyOS_GetLastModificationTime PyOS_InitInterrupts PyOS_InterruptOccurred PyOS_Readline diff --git a/PCbuild/pythoncore.vcproj b/PCbuild/pythoncore.vcproj index 569bad7..0d3d71e 100644 --- a/PCbuild/pythoncore.vcproj +++ b/PCbuild/pythoncore.vcproj @@ -1687,10 +1687,6 @@ > </File> <File - RelativePath="..\Python\getmtime.c" - > - </File> - <File RelativePath="..\Python\getopt.c" > </File> diff --git a/Python/getmtime.c b/Python/getmtime.c deleted file mode 100644 index 54edb53..0000000 --- a/Python/getmtime.c +++ /dev/null @@ -1,26 +0,0 @@ - -/* 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 - diff --git a/Python/import.c b/Python/import.c index 40fc018..08024b2 100644 --- a/Python/import.c +++ b/Python/import.c @@ -27,8 +27,6 @@ extern "C" { typedef unsigned short mode_t; #endif -extern time_t PyOS_GetLastModificationTime(char *, FILE *); - /* In getmtime.c */ /* Magic word to reject .pyc files generated by other Python versions. It should change for each incompatible change to the bytecode. diff --git a/RISCOS/Makefile b/RISCOS/Makefile index 1788b5c..bd63e38 100644 --- a/RISCOS/Makefile +++ b/RISCOS/Makefile @@ -135,7 +135,6 @@ OBJECTS_PYTHON =\ OBJECTS_RISCOS = \ @.Python.o.dynload_riscos\ @.Python.o.getcwd_riscos\ - @.Python.o.getmtime_riscos\ @.o.unixstuff diff --git a/RISCOS/Python/getmtime_riscos.c b/RISCOS/Python/getmtime_riscos.c deleted file mode 100644 index 9153638..0000000 --- a/RISCOS/Python/getmtime_riscos.c +++ /dev/null @@ -1,20 +0,0 @@ -#include <stdio.h> - -#define __swi -#include "oslib/osfile.h" - -long PyOS_GetLastModificationTime(char *path, FILE *fp) -{ - int obj; - bits load, exec, ftype; - - if (xosfile_read_stamped_no_path(path, &obj, &load, &exec, 0, 0, &ftype)) return -1; - if (obj != osfile_IS_FILE) return -1; - if (ftype == osfile_TYPE_UNTYPED) return -1; - - load &= 0xFF; - load -= 51; - if (exec < 1855548004U) load--; - exec -= 1855548004U; - return exec/100+42949672*load+(95*load)/100; -} |