diff options
author | Larry Hastings <larry@hastings.org> | 2012-05-03 07:30:07 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2012-05-03 07:30:07 (GMT) |
commit | 76ad59b7e826691e0eb19f04cb647e07cdbde76a (patch) | |
tree | 3c775b67065ab0424b23367462d324648add4810 /Include/pytime.h | |
parent | 3a7f7977f1ad3e5afe79254eef5057c0288613db (diff) | |
download | cpython-76ad59b7e826691e0eb19f04cb647e07cdbde76a.zip cpython-76ad59b7e826691e0eb19f04cb647e07cdbde76a.tar.gz cpython-76ad59b7e826691e0eb19f04cb647e07cdbde76a.tar.bz2 |
Issue #14127: Add ns= parameter to utime, futimes, and lutimes.
Removed futimens as it is now redundant.
Changed shutil.copystat to use st_atime_ns and st_mtime_ns from os.stat
and ns= parameter to utime--it once again preserves exact metadata on Linux!
Diffstat (limited to 'Include/pytime.h')
-rw-r--r-- | Include/pytime.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/pytime.h b/Include/pytime.h index 7442c6f..dd4cc69 100644 --- a/Include/pytime.h +++ b/Include/pytime.h @@ -62,6 +62,10 @@ PyAPI_FUNC(int) _PyTime_ObjectToTime_t( PyAPI_FUNC(PyObject *) _PyLong_FromTime_t( time_t sec); +/* Convert a PyLong to a time_t. */ +PyAPI_FUNC(time_t) _PyLong_AsTime_t( + PyObject *obj); + /* Convert a number of seconds, int or float, to a timeval structure. usec is in the range [0; 999999] and rounded towards zero. For example, -1.2 is converted to (-2, 800000). */ |