diff options
author | Tomas Carnecky <tom@dbservice.com> | 2008-08-28 18:05:40 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2008-08-28 18:05:40 -0400 |
commit | ebea78cdba0ff14a397239ee1936bd254c181e1b (patch) | |
tree | 3937720753cc112aaf9eb71ba0dcb39674362b98 /Xext | |
parent | ec7907f8fa04dcff2649cc4846975844314f737e (diff) |
Prepare for array-index based devPrivates.
TODO: static indices can be made just an int; some indices
can be combined.
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/geext.c | 3 | ||||
-rw-r--r-- | Xext/mbuf.c | 6 | ||||
-rw-r--r-- | Xext/panoramiX.c | 6 | ||||
-rw-r--r-- | Xext/saver.c | 3 | ||||
-rw-r--r-- | Xext/security.c | 3 | ||||
-rw-r--r-- | Xext/shm.c | 3 | ||||
-rw-r--r-- | Xext/xevie.c | 4 | ||||
-rw-r--r-- | Xext/xselinux.c | 9 | ||||
-rw-r--r-- | Xext/xvmain.c | 3 | ||||
-rw-r--r-- | Xext/xvmc.c | 5 |
10 files changed, 30 insertions, 15 deletions
diff --git a/Xext/geext.c b/Xext/geext.c index 171fda160..8de4e7cb1 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -40,7 +40,8 @@ int GEEventBase; int GEErrorBase; -DevPrivateKey GEClientPrivateKey = &GEClientPrivateKey; +static int GEClientPrivateKeyIndex; +DevPrivateKey GEClientPrivateKey = &GEClientPrivateKeyIndex; int GEEventType; /* The opcode for all GenericEvents will have. */ int RT_GECLIENT = 0; diff --git a/Xext/mbuf.c b/Xext/mbuf.c index 08b933433..a23a4fa36 100644 --- a/Xext/mbuf.c +++ b/Xext/mbuf.c @@ -61,8 +61,10 @@ in this Software without prior written authorization from The Open Group. static int MultibufferEventBase; static int MultibufferErrorBase; -static DevPrivateKey MultibufferScreenPrivKey = &MultibufferScreenPrivKey; -static DevPrivateKey MultibufferWindowPrivKey = &MultibufferWindowPrivKey; +static int MultibufferScreenPrivKeyIndex; +static DevPrivateKey MultibufferScreenPrivKey = &MultibufferScreenPrivKeyIndex; +static int MultibufferWindowPrivKeyIndex; +static DevPrivateKey MultibufferWindowPrivKey = &MultibufferWindowPrivKeyIndex; static void PerformDisplayRequest ( MultibuffersPtr * /* ppMultibuffers */, diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 17f587b1e..22b51aa71 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -107,8 +107,10 @@ static void PanoramiXResetProc(ExtensionEntry*); int (* SavedProcVector[256]) (ClientPtr client) = { NULL, }; -static DevPrivateKey PanoramiXGCKey = &PanoramiXGCKey; -static DevPrivateKey PanoramiXScreenKey = &PanoramiXScreenKey; +static int PanoramiXGCKeyIndex; +static DevPrivateKey PanoramiXGCKey = &PanoramiXGCKeyIndex; +static int PanoramiXScreenKeyIndex; +static DevPrivateKey PanoramiXScreenKey = &PanoramiXScreenKeyIndex; typedef struct { DDXPointRec clipOrg; diff --git a/Xext/saver.c b/Xext/saver.c index d74495bfa..0bdcb8b94 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -228,7 +228,8 @@ MakeScreenPrivate ( ScreenPtr /* pScreen */ ); -static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKey; +static int ScreenPrivateKeyIndex; +static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKeyIndex; #define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \ dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey)) diff --git a/Xext/security.c b/Xext/security.c index bd92600f6..e37906366 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -50,7 +50,8 @@ static RESTYPE RTEventClient; static CallbackListPtr SecurityValidateGroupCallback = NULL; /* Private state record */ -static DevPrivateKey stateKey = &stateKey; +static int stateKeyIndex; +static DevPrivateKey stateKey = &stateKeyIndex; /* This is what we store as client security state */ typedef struct { diff --git a/Xext/shm.c b/Xext/shm.c index 312b9d109..a48d2bd5b 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -139,7 +139,8 @@ static ShmDescPtr Shmsegs; static Bool sharedPixmaps; static ShmFuncsPtr shmFuncs[MAXSCREENS]; static DestroyPixmapProcPtr destroyPixmap[MAXSCREENS]; -static DevPrivateKey shmPixmapPrivate = &shmPixmapPrivate; +static int shmPixmapPrivateIndex; +static DevPrivateKey shmPixmapPrivate = &shmPixmapPrivateIndex; static ShmFuncs miFuncs = {NULL, NULL}; static ShmFuncs fbFuncs = {fbShmCreatePixmap, NULL}; diff --git a/Xext/xevie.c b/Xext/xevie.c index bbbf04524..292f20761 100644 --- a/Xext/xevie.c +++ b/Xext/xevie.c @@ -77,9 +77,11 @@ DeviceIntPtr xeviemouse = NULL; Mask xevieMask = 0; int xevieEventSent = 0; int xevieKBEventSent = 0; -static DevPrivateKey xevieDevicePrivateKey = &xevieDevicePrivateKey; static Bool xevieModifiersOn = FALSE; +static int xevieDevicePrivateKeyIndex; +static DevPrivateKey xevieDevicePrivateKey = &xevieDevicePrivateKeyIndex; + #define XEVIEINFO(dev) ((xevieDeviceInfoPtr) \ dixLookupPrivate(&(dev)->devPrivates, xevieDevicePrivateKey)) diff --git a/Xext/xselinux.c b/Xext/xselinux.c index a47df03c2..2a8be0b6d 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -62,9 +62,12 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /* private state keys */ -static DevPrivateKey subjectKey = &subjectKey; -static DevPrivateKey objectKey = &objectKey; -static DevPrivateKey dataKey = &dataKey; +static int subjectKeyIndex; +static DevPrivateKey subjectKey = &subjectKeyIndex; +static int objectKeyIndex; +static DevPrivateKey objectKey = &objectKeyIndex; +static int dataKeyIndex; +static DevPrivateKey dataKey = &dataKeyIndex; /* subject state (clients and devices only) */ typedef struct { diff --git a/Xext/xvmain.c b/Xext/xvmain.c index e92a248e8..fcca724b0 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -105,7 +105,8 @@ SOFTWARE. #endif #include "xvdisp.h" -static DevPrivateKey XvScreenKey = &XvScreenKey; +static int XvScreenKeyIndex; +static DevPrivateKey XvScreenKey = &XvScreenKeyIndex; unsigned long XvExtensionGeneration = 0; unsigned long XvScreenGeneration = 0; unsigned long XvResourceGeneration = 0; diff --git a/Xext/xvmc.c b/Xext/xvmc.c index dc1e7dd98..ad1b8abc0 100644 --- a/Xext/xvmc.c +++ b/Xext/xvmc.c @@ -34,7 +34,8 @@ #define DR_CLIENT_DRIVER_NAME_SIZE 48 #define DR_BUSID_SIZE 48 -static DevPrivateKey XvMCScreenKey = NULL; +static int XvMCScreenKeyIndex; +static DevPrivateKey XvMCScreenKey; unsigned long XvMCGeneration = 0; @@ -709,7 +710,7 @@ XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt) { XvMCScreenPtr pScreenPriv; - XvMCScreenKey = &XvMCScreenKey; + XvMCScreenKey = &XvMCScreenKeyIndex; if(!(pScreenPriv = (XvMCScreenPtr)xalloc(sizeof(XvMCScreenRec)))) return BadAlloc; |