This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] Add an abstract incremental hash data type


On July 23, 2014 4:27:43 PM CEST, Andi Kleen <ak@linux.intel.com> wrote:
>> Btw, what will be the way to plug in an alternative hash function?
>> That is, there doesn't seem to be a separation of interface
>> and implementation in your patch (like with a template or a
>base-class
>> you inherit from).
>
>Just change the inchash.h include file. The point was to only
>change a single place.

So there will be at most one hash implementation?  Maybe use a namespace instead of a hash then?
So other places can extend it?

Why didn't you replace the tree.c uses BTW?

Thanks,
Richard.

>Inheritance would need changing everything again for the new type
>(unless we came up with hash factories that would likely defeat
>virtualization and would be over engineering)
>
>-Andi



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]