git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] pack-bitmap: do not use gcc packed attribute

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 6, 2014, 19:32 UTC
Message-ID
<xmqqd2cdmn1r.fsf@gitster.dls.corp.google.com>
In-Reply-To
<53E27ADC.4070501@gmail.com>
Karsten Blees <karsten.blees@gmail.com> writes:
Show 21 quoted lines
> Am 05.08.2014 20:47, schrieb Jeff King:
>> On Mon, Aug 04, 2014 at 09:19:46PM +0200, Karsten Blees wrote:
>> 
>>> Hmm, I wonder if it wouldn't be simpler to read / write the desired on-disk
>>> structure directly, without copying to a uchar[6] first.
>> 
>> Probably. My initial attempt was to keep together the read/write logic
>> about which sizes each item is, but I think the result ended up
>> unnecessarily verbose and harder to follow.
>> 
>
> Yeah, having read / write logic in different files is confusing, esp. when
> not using structs to define the file format.
>
>>> Here's what I came up with (just a sketch, commit message is lacky and the
>>> helper functions deserve a better place / name):
>> 
>> I like it. Want to clean it up and submit in place of mine?
>> 
>
> Will do, but it will have to wait till next week.
Thanks, both.
Previous: Karsten BleesNext: Karsten Blees
Message 10 of 12 in “struct hashmap_entry packing”
  1. Jeff KingJul 28, 2014
  2. Karsten BleesJul 29, 2014
  3. Jeff KingAug 1, 2014
  4. pack-bitmap: do not use gcc packed attributeJeff King, Aug 1, 2014
  5. Jeff KingAug 1, 2014
  6. Karsten BleesAug 4, 2014
  7. Vicent MartíAug 5, 2014
  8. Jeff KingAug 5, 2014
  9. Karsten BleesAug 6, 2014
  10. Junio C HamanoAug 6, 2014
  11. Karsten BleesAug 4, 2014
  12. Jeff KingAug 5, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.