summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Doc/c-api/sys.rst7
-rw-r--r--Doc/data/refcounts.dat3
-rw-r--r--Makefile.pre.in1
-rw-r--r--Misc/NEWS2
-rw-r--r--PC/VC6/pythoncore.dsp4
-rw-r--r--PC/VS7.1/pythoncore.vcproj3
-rw-r--r--PC/VS8.0/pythoncore.vcproj4
-rw-r--r--PC/os2emx/Makefile1
-rw-r--r--PC/os2emx/python27.def3
-rw-r--r--PC/os2vacpp/makefile2
-rw-r--r--PC/os2vacpp/makefile.omk2
-rw-r--r--PC/os2vacpp/python.def1
-rw-r--r--PCbuild/pythoncore.vcproj4
-rw-r--r--Python/getmtime.c26
-rw-r--r--Python/import.c2
15 files changed, 2 insertions, 63 deletions
diff --git a/Doc/c-api/sys.rst b/Doc/c-api/sys.rst
index 2a98c9d0e1..15f1af4ee2 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 73f6c1c849..a0e7e0c96c 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 4377afb4d8..42a061def3 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -263,7 +263,6 @@ PYTHON_OBJS= \
Python/getargs.o \
Python/getcompiler.o \
Python/getcopyright.o \
- Python/getmtime.o \
Python/getplatform.o \
Python/getversion.o \
Python/graminit.o \
diff --git a/Misc/NEWS b/Misc/NEWS
index c3d70744d7..7be8b6c05d 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,8 @@ What's New in Python 3.1 alpha 0
Core and Builtins
-----------------
+- Issue #4817: Remove unused function PyOS_GetLastModificationTime.
+
- Issue #4580: Fix slicing of memoryviews when the item size is greater than
one byte. Also fixes the meaning of len() so that it returns the number of
items, rather than the size in bytes.
diff --git a/PC/VC6/pythoncore.dsp b/PC/VC6/pythoncore.dsp
index 732201af3a..6f6abdbd88 100644
--- a/PC/VC6/pythoncore.dsp
+++ b/PC/VC6/pythoncore.dsp
@@ -402,10 +402,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 1d977d3af7..a5df0d1062 100644
--- a/PC/VS7.1/pythoncore.vcproj
+++ b/PC/VS7.1/pythoncore.vcproj
@@ -557,9 +557,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 f925c40021..9139fa1bec 100644
--- a/PC/VS8.0/pythoncore.vcproj
+++ b/PC/VS8.0/pythoncore.vcproj
@@ -1651,10 +1651,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 8b4c404f56..de42387ae8 100644
--- a/PC/os2emx/Makefile
+++ b/PC/os2emx/Makefile
@@ -339,7 +339,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 46c548e868..3cd1ad3f0d 100644
--- a/PC/os2emx/python27.def
+++ b/PC/os2emx/python27.def
@@ -930,9 +930,6 @@ EXPORTS
; From python26_s.lib(getcopyright)
"Py_GetCopyright"
-; From python26_s.lib(getmtime)
- "PyOS_GetLastModificationTime"
-
; From python26_s.lib(getplatform)
"Py_GetPlatform"
diff --git a/PC/os2vacpp/makefile b/PC/os2vacpp/makefile
index 5c110fedae..8aecdea16d 100644
--- a/PC/os2vacpp/makefile
+++ b/PC/os2vacpp/makefile
@@ -1377,8 +1377,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 24361d64ac..448e04f578 100644
--- a/PC/os2vacpp/makefile.omk
+++ b/PC/os2vacpp/makefile.omk
@@ -939,8 +939,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 2b2d6e13dd..94e094e8d1 100644
--- a/PC/os2vacpp/python.def
+++ b/PC/os2vacpp/python.def
@@ -280,7 +280,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 4cc3f2ee74..33fd07b779 100644
--- a/PCbuild/pythoncore.vcproj
+++ b/PCbuild/pythoncore.vcproj
@@ -1651,10 +1651,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 54edb531df..0000000000
--- 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 621284ecb4..d7858ef1bf 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.