mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
devPrivates rework: pass address of pointer to private callbacks instead of
the pointer itself.
This commit is contained in:
@@ -117,7 +117,7 @@ dixAllocatePrivate(PrivateRec **privates, devprivate_key_t *const key)
|
||||
|
||||
/* call any init funcs and return */
|
||||
if (item) {
|
||||
PrivateCallbackRec calldata = { key, ptr->value };
|
||||
PrivateCallbackRec calldata = { key, &ptr->value };
|
||||
CallCallbacks(&item->initfuncs, &calldata);
|
||||
}
|
||||
return &ptr->value;
|
||||
@@ -138,7 +138,7 @@ dixFreePrivates(PrivateRec *privates)
|
||||
item = findItem(ptr->key);
|
||||
if (item) {
|
||||
calldata.key = ptr->key;
|
||||
calldata.value = ptr->value;
|
||||
calldata.value = &ptr->value;
|
||||
CallCallbacks(&item->deletefuncs, &calldata);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ dixSetPrivate(PrivateRec **privates, devprivate_key_t *const key, pointer val)
|
||||
*/
|
||||
typedef struct _PrivateCallback {
|
||||
devprivate_key_t *key; /* private registration key */
|
||||
pointer value; /* pointer to private */
|
||||
pointer *value; /* address of private pointer */
|
||||
} PrivateCallbackRec;
|
||||
|
||||
extern int
|
||||
|
||||
Reference in New Issue
Block a user