Re: [RFC/PATCHv2 1/6] decorate: allow storing values instead of pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 13, 2011 at 04:08:14PM -0400, Jeff King wrote:

> I have to say, though, between the alignment issues and the strict
> aliasing, I am tempted to scrap this whole approach and just use macros
> to define the few functions we need. It's not like these containers are
> heterogenous, or that we have a ton of types. Right now we want to map
> "void *" and "uint32_t". In the future, I'd like to map a 20-byte sha1.

So here's what that would look like (at least the decorate part).

Doing macro meta-programming like this makes me feel a little dirty, but
I actually think the result is more readable.

  [1/3]: implement generic key/value map
  [2/3]: fast-export: use object to uint32 map instead of "decorate"
  [3/3]: decorate: use "map" for the underlying implementation

What do you think?

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]