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

Re: [PATCH v2] builtin-fast-export: Add importing and exporting of revision marks

From
PBPieter de Bie <pdebie@ai.rug.nl>
Date
Jun 7, 2008, 13:06 UTC
Message-ID
<DB158BDE-70D1-4779-9B03-A85C60EB2FA7@ai.rug.nl>
In-Reply-To
<7v8wxirwi1.fsf@gitster.siamese.dyndns.org>
On 7 jun 2008, at 01:09, Junio C Hamano wrote:
Show 11 quoted lines
> I am confused.
>
> The type of object_decoration.decorattion is a (void*).  Why isn't it
> sufficient to do it in a naïve and straightforward way?
>
> 	mark = (uint32_t)(deco->decoration);
>        add_decoration(&idnums, object, (void*) mark);
>
> Is this twisted pointer arithmetic done in order to avoid cast  
> between int
> and pointer of different size in the code?

I'm not sure why this is done; I simply copied what the existing code already did.

>  Even if that is the case,
> doesn't "(uint32_t *)deco->decoration - (uint32_t *)NULL" mean the  
> value
> range for deco->decoration is one-fourth of U32?
I'd imagine so, yes
- Pieter
Previous: Junio C HamanoNext: Johannes Schindelin
Message 7 of 18 in “builtin-fast-export: Add importing and exporting of revision marks”
  1. builtin-fast-export: Add importing and exporting of revision marksPieter de Bie, Jun 4, 2008
  2. Johannes SchindelinJun 5, 2008
  3. Pieter de BieJun 5, 2008
  4. builtin-fast-export: Add importing and exporting of revision marksPieter de Bie, Jun 5, 2008
  5. Johannes SchindelinJun 5, 2008
  6. Junio C HamanoJun 6, 2008
  7. Pieter de BieJun 7, 2008
  8. Johannes SchindelinJun 7, 2008
  9. Junio C HamanoJun 7, 2008
  10. Johannes SchindelinJun 11, 2008
  11. Documentation/fast-export: Document --import-marks and --export-marks optionsPieter de Bie, Jun 7, 2008
  12. Johannes SchindelinJun 7, 2008
  13. Junio C HamanoJun 10, 2008
  14. builtin-fast-export: Add importing and exporting of revision marksPieter de Bie, Jun 11, 2008
  15. Pieter de BieJun 11, 2008
  16. Johannes SchindelinJun 11, 2008
  17. Junio C HamanoJun 11, 2008
  18. Johannes SchindelinJun 5, 2008

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.