[PATCH 4 of 6 RFC] radixlink: add pure C implementation for radixlink read operation

Jun Wu quark at fb.com
Wed May 24 17:27:51 EDT 2017


Excerpts from Augie Fackler's message of 2017-05-24 17:21:48 -0400:
> [...]
> 
> nit: could these be static inline and let the compiler do the work of
> making it efficient? I'd kind of rather that than macros...

They are mainly to make the code shorter and easier to read. Compare:

  uint8_t x;
  read8(x, data, offset);

with:

  uint8_t x;
  if (tryreadoffset(...) == -1) {
    return -1;
  }

I guess we prefer the more explicit (longer) way. I can replace macros.

> [...]


More information about the Mercurial-devel mailing list