[PATCH 1/4] devPrivates rework (v2): add RC_PRIVATES class

Eamon Walsh ewalsh at tycho.nsa.gov
Mon Mar 5 11:25:41 PST 2007


Adds RC_PRIVATES class for use in identifying resources that have the 
devPrivates field.

--

 resource.h |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--

diff --git a/include/resource.h b/include/resource.h
index 3231e8c..a3477ef 100644
--- a/include/resource.h
+++ b/include/resource.h
@@ -66,7 +66,12 @@ typedef unsigned long RESTYPE;
  *  Extensions can use this too!
  */
 #define RC_NEVERRETAIN	((RESTYPE)1<<29)
-#define RC_LASTPREDEF	RC_NEVERRETAIN
+/*  Use class RC_PRIVATES for resources that support extra private data.
+ *  Resources having this class must provide a field of type ResourcePtr
+ *  at the top of the resource structure, which must be initalized to NULL.
+ */
+#define RC_PRIVATES	((RESTYPE)1<<28)
+#define RC_LASTPREDEF	RC_PRIVATES
 #define RC_ANY		(~(RESTYPE)0)
 
 /* types for Resource routines */





More information about the xorg mailing list