summaryrefslogtreecommitdiff
path: root/dix/dixutils.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-01-31 12:05:08 +1100
committerAdam Jackson <ajax@redhat.com>2008-02-14 07:02:13 +1100
commitaa5216e89797b600f382c04e3eaa657e808a5c3e (patch)
treee33abcb51ace22aab23bc72df1a102bf31c6de30 /dix/dixutils.c
parent0d492b2166c4026b9078ffd86d89a31ebe590be4 (diff)
Rip out useless indirection in the callback list management.
Diffstat (limited to 'dix/dixutils.c')
-rw-r--r--dix/dixutils.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/dix/dixutils.c b/dix/dixutils.c
index dd485d518..aaf510623 100644
--- a/dix/dixutils.c
+++ b/dix/dixutils.c
@@ -816,16 +816,8 @@ _DeleteCallbackList(
*pcbl = NULL;
}
-static CallbackFuncsRec default_cbfuncs =
-{
- _AddCallback,
- _DeleteCallback,
- _CallCallbacks,
- _DeleteCallbackList
-};
-
static Bool
-CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
+CreateCallbackList(CallbackListPtr *pcbl)
{
CallbackListPtr cbl;
int i;
@@ -833,7 +825,6 @@ CreateCallbackList(CallbackListPtr *pcbl, CallbackFuncsPtr cbfuncs)
if (!pcbl) return FALSE;
cbl = (CallbackListPtr) xalloc(sizeof(CallbackListRec));
if (!cbl) return FALSE;
- cbl->funcs = cbfuncs ? *cbfuncs : default_cbfuncs;
cbl->inCallback = 0;
cbl->deleted = FALSE;
cbl->numDeleted = 0;
@@ -864,31 +855,31 @@ AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
if (!pcbl) return FALSE;
if (!*pcbl)
{ /* list hasn't been created yet; go create it */
- if (!CreateCallbackList(pcbl, (CallbackFuncsPtr)NULL))
+ if (!CreateCallbackList(pcbl))
return FALSE;
}
- return ((*(*pcbl)->funcs.AddCallback) (pcbl, callback, data));
+ return _AddCallback(pcbl, callback, data);
}
_X_EXPORT Bool
DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, pointer data)
{
if (!pcbl || !*pcbl) return FALSE;
- return ((*(*pcbl)->funcs.DeleteCallback) (pcbl, callback, data));
+ return _DeleteCallback(pcbl, callback, data);
}
void
CallCallbacks(CallbackListPtr *pcbl, pointer call_data)
{
if (!pcbl || !*pcbl) return;
- (*(*pcbl)->funcs.CallCallbacks) (pcbl, call_data);
+ _CallCallbacks(pcbl, call_data);
}
void
DeleteCallbackList(CallbackListPtr *pcbl)
{
if (!pcbl || !*pcbl) return;
- (*(*pcbl)->funcs.DeleteCallbackList) (pcbl);
+ _DeleteCallbackList(pcbl);
}
void