[D-runtime] [D-Programming-Language/druntime] 3508ce: Fix for 12837: Duration's get and individual unit ...

GitHub via D-runtime d-runtime at puremagic.com
Sun Jun 1 15:57:13 PDT 2014


  Branch: refs/heads/master
  Home:   https://github.com/D-Programming-Language/druntime
  Commit: 3508ce56c3c299709f747e59bdfcace03dd6f30c
      https://github.com/D-Programming-Language/druntime/commit/3508ce56c3c299709f747e59bdfcace03dd6f30c
  Author: jmdavis <jmdavisProg at gmx.com>
  Date:   2014-06-01 (Sun, 01 Jun 2014)

  Changed paths:
    M src/core/time.d

  Log Message:
  -----------
  Fix for 12837: Duration's get and individual unit getters are bug-prone.

Experience has shown that most people (who don't read the documentation)
seem to expect that get and the indivdual getters return what total
returns, causing bugs. So, this commit renames get to getOnly (leaving
get as a deprecated alias to getOnly) and deprecates the individual unit
getters, forcing folks to use total or getOnly explicitly. It's likely
that most code that will have to change because of these changes is
broken anyway, so this will catch bugs.


  Commit: afacca38a00e40383dc5255f56d058883e41d604
      https://github.com/D-Programming-Language/druntime/commit/afacca38a00e40383dc5255f56d058883e41d604
  Author: Martin Nowak <code at dawg.eu>
  Date:   2014-06-01 (Sun, 01 Jun 2014)

  Changed paths:
    M src/core/time.d

  Log Message:
  -----------
  Merge pull request #822 from jmdavis/time

Fix for 12837: Duration's get and individual unit getters are bug-prone.


Compare: https://github.com/D-Programming-Language/druntime/compare/e8edc648492d...afacca38a00e


More information about the D-runtime mailing list