[Xcb] XCBGetRequestRead()

Jamey Sharp jamey at minilop.net
Tue Apr 18 11:17:15 PDT 2006


On Mon, Apr 17, 2006 at 11:04:16PM -0700, Barton C Massey wrote:
> Thanks!  I've copied your text into the bug.
> 
> My inclination is the same as yours; kill
> XCBGetRequestRead() and add XCBPollForReply().
> 
> 1) IMHO you needn't make it "type-safe"; it's a deprecated
>    magic interface.

It isn't deprecated, but it is magic. I'll buy that.

> 2) So you have the usual litany of bad multiple-return-value
>    and disjoint union workarounds for C.  Pick one that
>    looks like the others we're using in XCB; they all are
>    awful.
> 
> 3) Yeah, you probably want to do the in-out thing with the
>    reply record the same as you are with the event record.

How's this?

	int XCBPollForReply(XCBConnection *c, unsigned int
	request, void **reply, XCBGenericError **error);

	Returns zero if XCBWaitForReply would have blocked on
	the same c and request arguments. Otherwise, returns
	non-zero and fills in reply with the value that
	XCBWaitForReply would have returned, and manipulates
	error the same way that XCBWaitForReply would have.

I guess I'll place this in the extension API (xcbext.h), even
though no extension will use it (I think), since it goes with
XCBWaitForReply which is in that API.

> My 2 cents---probably wrong.  We need to get this resolved
> quickly, though.

Yeah, I'll buy that too.

--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20060418/7c95d468/attachment.pgp


More information about the Xcb mailing list