From ebea78cdba0ff14a397239ee1936bd254c181e1b Mon Sep 17 00:00:00 2001 From: Tomas Carnecky Date: Thu, 28 Aug 2008 18:05:40 -0400 Subject: Prepare for array-index based devPrivates. TODO: static indices can be made just an int; some indices can be combined. --- render/animcur.c | 4 +++- render/picture.c | 6 ++++-- render/render.c | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'render') diff --git a/render/animcur.c b/render/animcur.c index 362607f7a..5723442fa 100644 --- a/render/animcur.c +++ b/render/animcur.c @@ -91,7 +91,9 @@ static CursorBits animCursorBits = { }; static int AnimCurGeneration; -static DevPrivateKey AnimCurScreenPrivateKey = &AnimCurScreenPrivateKey; + +static int AnimCurScreenPrivateKeyIndex; +static DevPrivateKey AnimCurScreenPrivateKey = &AnimCurScreenPrivateKeyIndex; #define IsAnimCur(c) ((c) && ((c)->bits == &animCursorBits)) #define GetAnimCur(c) ((AnimCurPtr) ((c) + 1)) diff --git a/render/picture.c b/render/picture.c index b7874bb64..9def47b0f 100644 --- a/render/picture.c +++ b/render/picture.c @@ -43,8 +43,10 @@ #include "xace.h" #include "registry.h" -_X_EXPORT DevPrivateKey PictureScreenPrivateKey = &PictureScreenPrivateKey; -DevPrivateKey PictureWindowPrivateKey = &PictureWindowPrivateKey; +static int PictureScreenPrivateKeyIndex; +_X_EXPORT DevPrivateKey PictureScreenPrivateKey = &PictureScreenPrivateKeyIndex; +static int PictureWindowPrivateKeyIndex; +DevPrivateKey PictureWindowPrivateKey = &PictureWindowPrivateKeyIndex; static int PictureGeneration; RESTYPE PictureType; RESTYPE PictFormatType; diff --git a/render/render.c b/render/render.c index b1d6d5853..1b7d78b87 100644 --- a/render/render.c +++ b/render/render.c @@ -211,7 +211,8 @@ int (*SProcRenderVector[RenderNumberRequests])(ClientPtr) = { }; int RenderErrBase; -DevPrivateKey RenderClientPrivateKey; +static int RenderClientPrivateKeyIndex; +DevPrivateKey RenderClientPrivateKey = &RenderClientPrivateKeyIndex; typedef struct _RenderClient { int major_version; -- cgit v1.2.3