[PATCH] render: return the supported version rather than just passing the proto's version

Keith Packard keithp at keithp.com
Mon Sep 14 21:24:17 PDT 2009


On Tue, 2009-09-15 at 13:30 +1000, Peter Hutterer wrote:

> Keith?

I don't have any great suggestions here (aside from the obvious need to
fix the server to respect the protocol version requirements). As you
note, it's almost impossible to get the versioning right. One option
would be to require a suitable 'which version do you want' #define
before including the protocol header file, then making that restrict the
set of symbols to those related to that version would mean that the X
server or library would get a compile error if they attempt to export
new functions without updating their symbol.

#define REQUESTED_RENDER_MAJOR 0
#define REQUESTED_RENDER_MINOR 11
#include <renderproto.h>

	rep.minorVersion = RENDER_MAJOR;
	rep.minorVersion = RENDER_MINOR;

Making RENDER_MAJOR and RENDER_MINOR depend on REQUESTED_RENDER_* may
help? Requiring REQUESTED_RENDER_MAJOR and REQUESTED_RENDER_MINOR in the
renderproto.h to eliminate another source of error.

-keith

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
Url : http://lists.x.org/archives/xorg-devel/attachments/20090914/daf31872/attachment.pgp 


More information about the xorg-devel mailing list