Thread (32 messages) 32 messages, 6 authors, 2016-06-15

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

From: Jeff King <hidden>
Date: 2016-06-15 22:51:35

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help