[Xcb] [PATCH] Making XCB less of a memory hog

Tilman Sauerbeck tilman at code-monkey.de
Fri May 11 12:15:30 PDT 2007


Barton C Massey [2007-05-11 11:55]:
> In message <20070511151628.GA1818 at code-monkey.de> you wrote:
> > OTOH, this unfortunately breaks the API.
> 
> My reading-XML-at-the-terminal ability is limited.  What
> does the proposed API look like?  Or did you mean an ABI
> break, about which we probably care not at all?

Imagine the following piece of code in random_extension.c:

  static const xcb_protocol_request_t xcb_req = {
     ...,
     &ext,
	 ...
  };

  ...

  xcb_send_request(..., &xcb_req);

The patch would change that to:

  static const xcb_protocol_request_t xcb_req = {
     /* no ext-pointer here */
  };

  xcb_send_request(..., &xcb_req, &ext);

So that ext pointer is moved from the struct to the function call.
This would break the API and the ABI.

That's for the patch I submitted, but I also outlined a way to avoid the
break, by adding xcb_send_request2(), that takes the new arguments.

Let me know if I need to explain better.

Regards,
Tilman

-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xcb/attachments/20070511/d0468c8e/attachment-0001.pgp 


More information about the Xcb mailing list