[Xcb-commit] xcb/src xcb.h,1.6,1.7 xcb_in.c,1.17,1.18

Jamey Sharp xcb-commit at lists.freedesktop.org
Wed Dec 7 23:07:24 PST 2005


Update of /cvs/xcb/xcb/src
In directory gabe:/tmp/cvs-serv27764/src

Modified Files:
	xcb.h xcb_in.c 
Log Message:
Use GCC attribute extension, if available, to mark some
functions deprecated; and rename XCBWaitEvent to
XCBWaitForEvent, with a deprecated backwards compatibility
function.


Index: xcb.h
===================================================================
RCS file: /cvs/xcb/xcb/src/xcb.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- xcb.h	8 Dec 2005 05:51:19 -0000	1.6
+++ xcb.h	8 Dec 2005 07:07:22 -0000	1.7
@@ -36,6 +36,12 @@
 extern "C" {
 #endif
 
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
+#define deprecated __attribute__((__deprecated__))
+#else
+#define deprecated
+#endif
+
 /* Pre-defined constants */
 
 /* current protocol version */
@@ -101,7 +107,7 @@
     char *data;
 } XCBAuthInfo;
 
-int XCBGetAuthInfo(int fd, XCBAuthInfo *info);
+int XCBGetAuthInfo(int fd, XCBAuthInfo *info) deprecated;
 
 
 /* xcb_out.c */
@@ -112,7 +118,8 @@
 
 /* xcb_in.c */
 
-XCBGenericEvent *XCBWaitEvent(XCBConnection *c);
+XCBGenericEvent *XCBWaitEvent(XCBConnection *c) deprecated;
+XCBGenericEvent *XCBWaitForEvent(XCBConnection *c);
 XCBGenericEvent *XCBPollForEvent(XCBConnection *c, int *error);
 unsigned int XCBGetRequestRead(XCBConnection *c);
 
@@ -140,11 +147,11 @@
 /* xcb_util.c */
 
 int XCBParseDisplay(const char *name, char **host, int *display, int *screen);
-int XCBOpen(const char *host, int display);
-int XCBOpenTCP(const char *host, unsigned short port);
-int XCBOpenUnix(const char *file);
+int XCBOpen(const char *host, int display) deprecated;
+int XCBOpenTCP(const char *host, unsigned short port) deprecated;
+int XCBOpenUnix(const char *file) deprecated;
 
-XCBConnection *XCBConnectBasic(void); /* deprecated */
+XCBConnection *XCBConnectBasic(void) deprecated;
 XCBConnection *XCBConnect(const char *displayname, int *screenp);
 XCBConnection *XCBConnectToDisplayWithAuthInfo(const char *display, XCBAuthInfo *auth, int *screen);
 

Index: xcb_in.c
===================================================================
RCS file: /cvs/xcb/xcb/src/xcb_in.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- xcb_in.c	10 Apr 2005 18:24:57 -0000	1.17
+++ xcb_in.c	8 Dec 2005 07:07:22 -0000	1.18
@@ -126,6 +126,11 @@
 
 XCBGenericEvent *XCBWaitEvent(XCBConnection *c)
 {
+    return XCBWaitForEvent(c);
+}
+
+XCBGenericEvent *XCBWaitForEvent(XCBConnection *c)
+{
     XCBGenericEvent *ret;
 
 #if XCBTRACEEVENT



More information about the xcb-commit mailing list