June 11, 2014 [D-runtime] [D-Programming-Language/druntime] 0c86bc: Fix for 12837: Duration's get and individual unit ... | ||||
---|---|---|---|---|
| ||||
Attachments:
| Branch: refs/heads/master Home: https://github.com/D-Programming-Language/druntime Commit: 0c86bcb8199fafb241f4717f29714ee318e0561e https://github.com/D-Programming-Language/druntime/commit/0c86bcb8199fafb241f4717f29714ee318e0561e Author: jmdavis <jmdavisProg@gmx.com> Date: 2014-06-06 (Fri, 06 Jun 2014) Changed paths: M src/core/sync/config.d M src/core/thread.d 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 (at least some of who don't read the documentation) seem to expect that get and the indivdual getters return what total returns, causing bugs. So, this commit deprecates Duration.get and all of the individual unit getters (including Duration.fracSec). split has been added in their stead. It takes a list of time unit strings and splits the Duration into those units either assigning them to the provided pointers to integers or by returning a struct with the values for the units as its members. It's likely that most code that will have to change because of these changes is broken anyway, so this will catch bugs. Commit: 4e70463aa15e24e46d0f42091d8b5dcae0c59baf https://github.com/D-Programming-Language/druntime/commit/4e70463aa15e24e46d0f42091d8b5dcae0c59baf Author: Steven Schveighoffer <schveiguy@yahoo.com> Date: 2014-06-11 (Wed, 11 Jun 2014) Changed paths: M src/core/sync/config.d M src/core/thread.d M src/core/time.d Log Message: ----------- Merge pull request #825 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/52e499b82169...4e70463aa15e |
Copyright © 1999-2021 by the D Language Foundation