Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a32c9941
Commit
a32c9941
authored
Sep 09, 2002
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always generate floats for stat_result; fix configure test.
parent
94717ed1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
20 deletions
+10
-20
Doc/lib/libos.tex
Doc/lib/libos.tex
+5
-6
Misc/NEWS
Misc/NEWS
+1
-2
Modules/posixmodule.c
Modules/posixmodule.c
+1
-9
configure
configure
+2
-2
configure.in
configure.in
+1
-1
No files found.
Doc/lib/libos.tex
View file @
a32c9941
...
...
@@ -826,6 +826,10 @@ the \ctype{stat} structure, namely:
\member
{
st
_
ctime
}
(time of most recent content modification or metadata change).
\versionchanged
[The time values are floats, measuring
seconds. Fractions of a second may be reported if the system
supports that]
{
2.3
}
On some Unix systems (such as Linux), the following attributes may
also be available:
\member
{
st
_
blocks
}
(number of blocks allocated for file),
...
...
@@ -856,12 +860,7 @@ order
\member
{
st
_
atime
}
,
\member
{
st
_
mtime
}
,
\member
{
st
_
ctime
}
.
More items may be added at the end by some implementations. Note that
on the Mac OS, the time values are floating point values, like all
time values on the Mac OS.
\versionchanged
[On other systems, the values are floats if the system reports
fractions of a second]
{
2.3
}
More items may be added at the end by some implementations.
The standard module
\refmodule
{
stat
}
\refstmodindex
{
stat
}
defines
functions and constants that are useful for extracting information
from a
\ctype
{
stat
}
structure.
...
...
Misc/NEWS
View file @
a32c9941
...
...
@@ -274,8 +274,7 @@ Core and builtins
Extension modules
- The time stamps in os.stat_result are floating point numbers now if
the system supports that.
- The time stamps in os.stat_result are floating point numbers now.
- If the size passed to mmap.mmap() is larger than the length of the
file on non-Windows platforms, a ValueError is raised. [SF bug 585792]
...
...
Modules/posixmodule.c
View file @
a32c9941
...
...
@@ -616,15 +616,7 @@ static void
fill_time
(
PyObject
*
v
,
int
index
,
time_t
sec
,
unsigned
long
nsec
)
{
PyObject
*
val
;
if
(
nsec
)
{
val
=
PyFloat_FromDouble
(
sec
+
1e-9
*
nsec
);
}
else
{
#if SIZEOF_TIME_T > SIZEOF_LONG
val
=
PyLong_FromLongLong
((
LONG_LONG
)
sec
);
#else
val
=
PyInt_FromLong
((
long
)
sec
);
#endif
}
val
=
PyFloat_FromDouble
(
sec
+
1e-9
*
nsec
);
PyStructSequence_SET_ITEM
(
v
,
index
,
val
);
}
...
...
configure
View file @
a32c9941
#! /bin/sh
# From configure.in Revision: 1.34
1
.
# From configure.in Revision: 1.34
2
.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53.
#
...
...
@@ -15738,7 +15738,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
ac_cv_stat_tv_nsec
=
yes
ac_cv_stat_tv_nsec
=
yes
else
echo
"
$as_me
: failed program was:"
>
&5
cat
conftest.
$ac_ext
>
&5
...
...
configure.in
View file @
a32c9941
...
...
@@ -2247,7 +2247,7 @@ AC_TRY_COMPILE([#include <sys/stat.h>], [
struct stat st;
st.st_mtim.tv_nsec = 1;
],
ac_cv_stat_tv_nsec
=
yes,
ac_cv_stat_tv_nsec
=
yes,
ac_cv_stat_tv_nsec=no,
ac_cv_stat_tv_nsec=no))
AC_MSG_RESULT($ac_cv_stat_tv_nsec)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment