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 /hw/kdrive | |
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 'hw/kdrive')
-rw-r--r-- | hw/kdrive/ephyr/ephyrdriext.c | 6 | ||||
-rw-r--r-- | hw/kdrive/src/kdrive.c | 3 | ||||
-rw-r--r-- | hw/kdrive/src/kxv.c | 7 |
3 files changed, 10 insertions, 6 deletions
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c index 05cecf478..a906ad170 100644 --- a/hw/kdrive/ephyr/ephyrdriext.c +++ b/hw/kdrive/ephyr/ephyrdriext.c @@ -111,8 +111,10 @@ static Bool findWindowPairFromLocal (WindowPtr a_local, static unsigned char DRIReqCode = 0; -static DevPrivateKey ephyrDRIWindowKey = &ephyrDRIWindowKey; -static DevPrivateKey ephyrDRIScreenKey = &ephyrDRIScreenKey; +static int ephyrDRIWindowKeyIndex; +static DevPrivateKey ephyrDRIWindowKey = &ephyrDRIWindowKeyIndex; +static int ephyrDRIScreenKeyIndex; +static DevPrivateKey ephyrDRIScreenKey = &ephyrDRIScreenKeyIndex; #define GET_EPHYR_DRI_WINDOW_PRIV(win) ((EphyrDRIWindowPrivPtr) \ dixLookupPrivate(&(win)->devPrivates, ephyrDRIWindowKey)) diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 9e27840b7..1478a944d 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -67,7 +67,8 @@ KdDepths kdDepths[] = { #define KD_DEFAULT_BUTTONS 5 -DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKey; +static int kdScreenPrivateKeyIndex; +DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKeyIndex; unsigned long kdGeneration; Bool kdVideoTest; diff --git a/hw/kdrive/src/kxv.c b/hw/kdrive/src/kxv.c index 83ca3935f..9a74654af 100644 --- a/hw/kdrive/src/kxv.c +++ b/hw/kdrive/src/kxv.c @@ -103,9 +103,10 @@ static void KdXVClipNotify(WindowPtr pWin, int dx, int dy); /* misc */ static Bool KdXVInitAdaptors(ScreenPtr, KdVideoAdaptorPtr*, int); - -DevPrivateKey KdXVWindowKey = &KdXVWindowKey; -DevPrivateKey KdXvScreenKey = &KdXvScreenKey; +static int KdXVWindowKeyIndex; +DevPrivateKey KdXVWindowKey = &KdXVWindowKeyIndex; +static int KdXvScreenKeyIndex; +DevPrivateKey KdXvScreenKey = &KdXvScreenKeyIndex; static unsigned long KdXVGeneration = 0; static unsigned long PortResource = 0; |