Re: C++ pushback

Avi Kivity
2006-04-28T08:30:11Z

Avi Kivity wrote:
> void put(Value& value)
> {
> // assumes value (or a value with an equal key) is not already in
> Link& head = _buckets[Traits::hash(value) & (_size - 1)];
> static_cast<Link&>(value).next = &head;
> head.next= &value;
> }
s/&head/head.next/ in the third line, of course.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.