[Xcb] Setting the WM_TRANSIENT_FOR property on a window
Arnaud Fontaine
arnaud at andesi.org
Mon Mar 22 06:25:06 PDT 2010
>>>>> Peter Harris <git at peter.is-a-geek.org> writes:
Hi,
> I see you've used variable length arrays. A few points spring to
> mind:
> - Variable-length arrays are C99. The Microsoft C compilers still
> don't support most of C99.
As usual, they are far behind concerning standards implementation... I
didn't know that though, thanks!
> - Variable-length arrays are merely a portable way to spell
> "alloca". The server folks have just recently (2007) removed all
> allocas from the server. There is no portable way to determine the
> amount of stack space available, and alloca rarely returns NULL
> (and variable-length arrays can't). This matters less in a client
> side library, since you can only DoS yourself.
As C99 is already used in other bits of the library, I think it would be
better to use it when possible rather than relying on non-portable
functions such as alloca(). I am not familiar at all with Windows
programming environment, but maybe someone familiar with that could just
submit a patch to make xcb/util compiles on MS C Compiler using
macros?
> - Making an extra copy is no fun. XCB uses iovecs to try to avoid
> extra copies. You'd have to open-code ChangeProperty to use an
> iovec, though, which is ugly. Thoughts?
Yes, this is not really a good thing... I have no idea how to do it in
another way...
Thanks for the review.
Cheers,
Arnaud
More information about the Xcb
mailing list