On Fri, May 1, 2009 at 1:32 PM, Adam Barth <aba...@chromium.org> wrote:
> There's also a problem if you write something like:
>
> HANDLE_EINTR(close(PromptUserForFileDescriptor()));
>
> Macros suck.
>
> What about something like base::close that's inline and knows how to loop?

Yea, the macro will trigger multiple evaluation of the arguments.
Having inspected every case in base/, net/ and chrome/, it's not
currently a problem. Hopefully the ALL_CAPS name will alert people to
the possibility.

The alternative is to implement a wrapper for every system call which
needs wrapping. I don't much like that, but I'm willing to do it if
the balance of option favours it.


AGL

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to