]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #4817: Remove unused function PyOS_GetLastModificationTime.
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 3 Jan 2009 17:19:26 +0000 (17:19 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 3 Jan 2009 17:19:26 +0000 (17:19 +0000)
17 files changed:
Doc/c-api/sys.rst
Doc/data/refcounts.dat
Makefile.pre.in
Misc/NEWS
PC/VC6/pythoncore.dsp
PC/VS7.1/pythoncore.vcproj
PC/VS8.0/pythoncore.vcproj
PC/os2emx/Makefile
PC/os2emx/python27.def
PC/os2vacpp/makefile
PC/os2vacpp/makefile.omk
PC/os2vacpp/python.def
PCbuild/pythoncore.vcproj
Python/getmtime.c [deleted file]
Python/import.c
RISCOS/Makefile
RISCOS/Python/getmtime_riscos.c [deleted file]

index 7696811a78dc6e80500ce026ea606e0822c57a35..f5d2ab00230fc7b489ff0d5a014a3a6a443fd55e 100644 (file)
@@ -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
index 4d889bd5334aa162e18c7ded21e1aa7a4be4cd08..c8633c097c1458d8328d8aff3caacb41314756d5 100644 (file)
@@ -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:
 
index 83824ec7b8ecdc8b10c5c9451495eb79ceaf243a..1b2bcfe0536ab49c7deddbfa05239b6fab236298 100644 (file)
@@ -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 \
index 416995062db26d723e57f861cfc587be4575236e..f7394fd23e60eecefb4bd7e35895edc4578ccd73 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -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
index 5a89a44a975a380c41ecaaada9abdfc9b2d25eee..756e271cabcec8f1aa2c53217c312606d5d9e795 100644 (file)
@@ -410,10 +410,6 @@ SOURCE=..\..\Python\getcopyright.c
 # End Source File\r
 # Begin Source File\r
 \r
-SOURCE=..\..\Python\getmtime.c\r
-# End Source File\r
-# Begin Source File\r
-\r
 SOURCE=..\..\Python\getopt.c\r
 # End Source File\r
 # Begin Source File\r
index c2ccebb3d50a26d366e8e465d9397f622cc74d3b..601bfa096b2b473e9bef0ce85694b5ede0c752bc 100644 (file)
                <File
                        RelativePath="..\..\Python\getcopyright.c">
                </File>
-               <File
-                       RelativePath="..\..\Python\getmtime.c">
-               </File>
                <File
                        RelativePath="..\..\Python\getopt.c">
                </File>
index 4720a2fa1384b154c69d1e372fefcbd9c096a30a..d1be268337463ba62778cb7058b2527a031d97e0 100644 (file)
                                RelativePath="..\..\Python\getcopyright.c"
                                >
                        </File>
-                       <File
-                               RelativePath="..\..\Python\getmtime.c"
-                               >
-                       </File>
                        <File
                                RelativePath="..\..\Python\getopt.c"
                                >
index 9bfd9271b004642612f63874e96a22e825995220..82d548ef9e4f62d0e43aaba327e2e546eff440b7 100644 (file)
@@ -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 \
index e41303d02f0e5507b5f32d585b181fb85e9187a2..1a258e793538885c804b8d402b4fe134cc192d93 100644 (file)
@@ -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"
 
index c75bec3ded25f13a0f0d9aad83adabb85fb6e07e..1608960cb76a406b23e3731613ae9c64865a9550 100644 (file)
@@ -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 \
index e291627d120418fc005e1f3b6050c245f37b467b..a380c03d9965e7c924c50072e1058b31fe5844b0 100644 (file)
@@ -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 \
index 79d05b05f0b8aede94e14fa2920b2a21fa50f81c..ba0dfd699bf01c582c236beb433fb793e82ecb69 100644 (file)
@@ -284,7 +284,6 @@ EXPORTS
                PyNumber_Xor
                PyOS_AfterFork
                PyOS_FiniInterrupts
-               PyOS_GetLastModificationTime
                PyOS_InitInterrupts
                PyOS_InterruptOccurred
                PyOS_Readline
index 569bad7f1c64e3868d102597f14e094f24d85467..0d3d71e405a8f6e4f2e44d04893bb7b0f922154e 100644 (file)
                                RelativePath="..\Python\getcopyright.c"
                                >
                        </File>
-                       <File
-                               RelativePath="..\Python\getmtime.c"
-                               >
-                       </File>
                        <File
                                RelativePath="..\Python\getopt.c"
                                >
diff --git a/Python/getmtime.c b/Python/getmtime.c
deleted file mode 100644 (file)
index 54edb53..0000000
+++ /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
-
index 40fc0186e8dc8975715e2a901d77c4ea9bcb5c62..08024b21dbe42acfedaeeac8c428d4cc06dbaaba 100644 (file)
@@ -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.
index 1788b5c97c178d132b973665aa88f73f7ef1e347..bd63e383372a23a9ca06440214ab95a2298a5494 100644 (file)
@@ -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 (file)
index 9153638..0000000
+++ /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;
-}