[Xcb] xcb-util: ewmh library

Jamey Sharp jamey at minilop.net
Fri Sep 25 10:38:39 PDT 2009

On Fri, Sep 25, 2009 at 8:38 AM, Peter Harris <pharris at opentext.com> wrote:
> Unless I'm mistaken, m4 macros aren't that different from C preprocessor
> macros.

In broad terms that's true, but m4 is a lot more powerful than the C
preprocessor. The usual corresponding plusses and minuses apply: If
you need to do something complicated, it'll be a lot easier in m4, and
might even be impossible to do in the C preprocessor; but it's easier
to write code that nobody else will touch using m4. (Speaking as the
guy who initially wrote XCB as primarily a bunch of m4 macros...)

I'd kind of like to see more people use m4, because it's a pretty
decent tool for what it does, but that probably isn't a very good
reason here. Arnaud, you should probably do whatever you're
comfortable with.

> I don't think I've ever used a *_checked interface.

When it's useful, it's superb. Some Xlib code I've ported had racy
kludges with function callbacks and other crap that all went away when
I could just use a _checked function instead.

But it seems that those cases are rare, so doubling the size of the
API and the implementation was probably a poor choice. What could we
have done instead?


More information about the Xcb mailing list