[Numpy-svn] [numpy/numpy] e54f75: FIX: Use the NPY_TIME_T macro everywhere

GitHub noreply at github.com
Thu Dec 27 11:25:10 EST 2012


  Branch: refs/heads/maintenance/1.7.x
  Home:   https://github.com/numpy/numpy
  Commit: e54f750ad52eeb0f551ecf7b576aac8ef0d5b325
      https://github.com/numpy/numpy/commit/e54f750ad52eeb0f551ecf7b576aac8ef0d5b325
  Author: Ondřej Čertík <ondrej.certik at gmail.com>
  Date:   2012-12-27 (Thu, 27 Dec 2012)

  Changed paths:
    M numpy/core/src/multiarray/datetime_strings.c

  Log Message:
  -----------
  FIX: Use the NPY_TIME_T macro everywhere

Previously, two (critical) parts of the code used `time_t` instead of
`NPY_TIME_T`. Due to the fact, that most of the time `NPY_TIME_T` was equal to
`time_t`, this bug didn't show up. But in mingw, `NPY_TIME_T` is actually equal
to `__time64_t` and then this causes 64 bit integers to be cast into 32 bit
integers (thus becoming negative), which causes localtime() to fail in mingw.

Fixes gh-568.


  Commit: 7f3aeac8696dd4e169f8ed7034345dbddcd3718b
      https://github.com/numpy/numpy/commit/7f3aeac8696dd4e169f8ed7034345dbddcd3718b
  Author: Ondřej Čertík <ondrej.certik at gmail.com>
  Date:   2012-12-27 (Thu, 27 Dec 2012)

  Changed paths:
    M numpy/core/src/multiarray/datetime_strings.c

  Log Message:
  -----------
  Merge pull request #2857 from certik/backport2856

FIX: Use the NPY_TIME_T macro everywhere


Compare: https://github.com/numpy/numpy/compare/c2b2422c0d24...7f3aeac8696d


More information about the Numpy-svn mailing list