Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-15

Re: What's cooking in git.git (Dec 2013, #02; Fri, 6)

From: Thomas Rast <hidden>
Date: 2016-06-15 22:59:25

Possibly related (same subject, not in this thread)

Karsten Blees [off-list ref] writes:
Am 07.12.2013 23:23, schrieb Thomas Rast:
quoted
Karsten Blees [off-list ref] writes:
quoted
Extending 'struct hashmap_entry' with an int-sized member shouldn't waste
memory on 64-bit systems. This is already documented in api-hashmap.txt,
but needs '__attribute__((__packed__))' to work. Reduces e.g.
You'd have to guard __attribute__((__packed__)) with some compiler
detection in git-compat-util.h though.
Isn't that already handled? __attribute__ is already widely used
(e.g. for printf formats), and platforms that don't support it define
it as empty (e.g. MSVC). Or do you mean I should account for
compiler-specific variants (#pragma pack...)?
True, __attribute__ expands to nothing on unknown compilers, but what
does the compiler do when it sees an unknown attribute?  If some of them
choke, you need a separate macro.

I'm a bit confused myself though, many attributes have special macros in
git-compat-util.h but others we just use in the code.

-- 
Thomas Rast
tr@thomasrast.ch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help