Paul Eggert wrote:
> I tried hard to add support with as few #ifdefs as possible, to avoid 
> cluttering the code. Instead, I created a relatively small include file 
> ptr-bounds.h that packaged things up into easy-to-use macros. This meant 
> most of the rest of the Emacs code didn't need to use #ifdefs.

It's not clear to me whether the #ifdef approach or the macros approach
are better for maintainability. The #ifdef is clutter, sure, but it tells
the reader of the code "you don't need to worry about this, since it's
not active on your platform". The macros increase the developer's learning
curve, but OTOH are nicer w.r.t. refactorings.

In today's patches, a macro would have been nice in order to avoid a bit
of code duplication in malloca.h. But other than that?

> and CHERI might not survive.

Sure, it's experimental. But even a one-time use of CHERI may allow us
to squash bugs.

> the doc doesn't match the code

Ah? Which documented functions should I be wary of?

Bruno




Reply via email to