Escaping the Tyranny of the GC: std.rcstring, first blood
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Sat Sep 20 10:07:42 PDT 2014
On 9/20/14, 8:54 AM, "Nordlöw" wrote:
> On Saturday, 20 September 2014 at 15:21:18 UTC, Nordlöw wrote:
>> for RCString? I'm guessing there are two cases here;
>
> I'm guessing
>
> size_t toHash() const @trusted pure nothrow
> {
> import core.internal.hash : hashOf;
> if (isSmall)
> {
> return this.small.hashOf;
Oh in fact this.small.hashOf is incorrect anyway because it hashes
random characters after the used portion of the string. -- Andrei
More information about the Digitalmars-d
mailing list