Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive

[critical] change hashOf() to safe interface#1593

Merged
schveiguy merged 1 commit intodlang:masterfrom
WalterBright:hashSafe
Jun 15, 2016
Merged

[critical] change hashOf() to safe interface#1593
schveiguy merged 1 commit intodlang:masterfrom
WalterBright:hashSafe

Conversation

@WalterBright
Copy link
Member

When this gets pulled, all users of hashOf() need to be changed, and the old way deprecated.

* The default hash implementation.
*
* Copyright: Copyright Sean Kelly 2009 - 2009.
* Copyright: Copyright Sean Kelly 2009 - 2016.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about $(YEAR)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be inaccurate, as the year should be the last year the code was worked on rather than the year the documentation was generated.

@WalterBright
Copy link
Member Author

This turns out to be a critical bug fix, as many uses of hashOf() are incorrect in that they are passing '0' as the length of the hash!! Just goes to show the evils of default arguments coupled with multiple incompatible definitions of hashOf().

This doesn't actually fix the bugs I found, but is a precursor to getting them fixed.

Please don't delay pulling this.

@WalterBright WalterBright changed the title switch hashOf() to safe interface [critical] change hashOf() to safe interface Jun 15, 2016
@schveiguy
Copy link
Member

Auto-merge toggled on

@schveiguy schveiguy merged commit cf475a3 into dlang:master Jun 15, 2016
@WalterBright WalterBright deleted the hashSafe branch June 15, 2016 19:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants