summaryrefslogtreecommitdiff
path: root/record
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-08-28 09:28:25 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-08-28 09:28:25 -0400
commit4017d3190234e189a0bbd33193a148d4d3c7556b (patch)
tree2ab228113d410386afde50c893f137d95974b8f3 /record
parent85547073265ae9bc4ae3af920a6d3214fd1ca0c5 (diff)
devPrivates rework: since API is already broken, switch everything
over to new system. Need to update documentation and address some remaining vestiges of old system such as CursorRec structure, fb "offman" structure, and FontRec privates.
Diffstat (limited to 'record')
-rw-r--r--record/record.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/record/record.c b/record/record.c
index 0ed8f84c2..2e65e677b 100644
--- a/record/record.c
+++ b/record/record.c
@@ -164,13 +164,13 @@ typedef struct {
ProcFunctionPtr recordVector[256];
} RecordClientPrivateRec, *RecordClientPrivatePtr;
-static int RecordClientPrivateIndex;
+static DevPrivateKey RecordClientPrivateKey = &RecordClientPrivateKey;
/* RecordClientPrivatePtr RecordClientPrivate(ClientPtr)
* gets the client private of the given client. Syntactic sugar.
*/
#define RecordClientPrivate(_pClient) (RecordClientPrivatePtr) \
- ((_pClient)->devPrivates[RecordClientPrivateIndex].ptr)
+ dixLookupPrivate(&(_pClient)->devPrivates, RecordClientPrivateKey)
/***************************************************************************/
@@ -982,8 +982,8 @@ RecordInstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient)
memcpy(pClientPriv->recordVector, pClient->requestVector,
sizeof (pClientPriv->recordVector));
pClientPriv->originalVector = pClient->requestVector;
- pClient->devPrivates[RecordClientPrivateIndex].ptr =
- (pointer)pClientPriv;
+ dixSetPrivate(&pClient->devPrivates,
+ RecordClientPrivateKey, pClientPriv);
pClient->requestVector = pClientPriv->recordVector;
}
while ((pIter = RecordIterateSet(pRCAP->pRequestMajorOpSet,
@@ -1096,7 +1096,8 @@ RecordUninstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient)
if (!otherRCAPwantsProcVector)
{ /* nobody needs it, so free it */
pClient->requestVector = pClientPriv->originalVector;
- pClient->devPrivates[RecordClientPrivateIndex].ptr = NULL;
+ dixSetPrivate(&pClient->devPrivates,
+ RecordClientPrivateKey, NULL);
xfree(pClientPriv);
}
} /* end if this RCAP specifies any requests */
@@ -2948,10 +2949,6 @@ RecordExtensionInit(void)
if (!RTContext)
return;
- RecordClientPrivateIndex = AllocateClientPrivateIndex();
- if (!AllocateClientPrivate(RecordClientPrivateIndex, 0))
- return;
-
ppAllContexts = NULL;
numContexts = numEnabledContexts = numEnabledRCAPs = 0;