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

GitHub noreply@github....
Thu Dec 27 00:46:21 CST 2012


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 15022cbfc5fdbae023fae3b8384459d2dee07c53
      https://github.com/numpy/numpy/commit/15022cbfc5fdbae023fae3b8384459d2dee07c53
  Author: Ondřej Čertík <ondrej.certik@gmail.com>
  Date:   2012-12-26 (Wed, 26 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: 7a0c495cdd0e07e6e8430db96aed98510845c0c2
      https://github.com/numpy/numpy/commit/7a0c495cdd0e07e6e8430db96aed98510845c0c2
  Author: Charles Harris <charlesr.harris@gmail.com>
  Date:   2012-12-26 (Wed, 26 Dec 2012)

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

  Log Message:
  -----------
  Merge pull request #2856 from certik/fix568

FIX: Use the NPY_TIME_T macro everywhere


Compare: https://github.com/numpy/numpy/compare/db671db12269...7a0c495cdd0e


More information about the Numpy-svn mailing list