diff options
-rw-r--r-- | dix/dixutils.c | 21 | ||||
-rw-r--r-- | include/dix.h | 19 | ||||
-rw-r--r-- | include/dixstruct.h | 1 |
3 files changed, 6 insertions, 35 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 diff --git a/include/dix.h b/include/dix.h index 8cfbbc4f6..ec9806aef 100644 --- a/include/dix.h +++ b/include/dix.h @@ -498,25 +498,6 @@ typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */ typedef void (*CallbackProcPtr) ( CallbackListPtr *, pointer, pointer); -typedef Bool (*AddCallbackProcPtr) ( - CallbackListPtr *, CallbackProcPtr, pointer); - -typedef Bool (*DeleteCallbackProcPtr) ( - CallbackListPtr *, CallbackProcPtr, pointer); - -typedef void (*CallCallbacksProcPtr) ( - CallbackListPtr *, pointer); - -typedef void (*DeleteCallbackListProcPtr) ( - CallbackListPtr *); - -typedef struct _CallbackProcs { - AddCallbackProcPtr AddCallback; - DeleteCallbackProcPtr DeleteCallback; - CallCallbacksProcPtr CallCallbacks; - DeleteCallbackListProcPtr DeleteCallbackList; -} CallbackFuncsRec, *CallbackFuncsPtr; - extern Bool AddCallback( CallbackListPtr * /*pcbl*/, CallbackProcPtr /*callback*/, diff --git a/include/dixstruct.h b/include/dixstruct.h index cbeac48cb..d44b9cfa7 100644 --- a/include/dixstruct.h +++ b/include/dixstruct.h @@ -187,7 +187,6 @@ typedef struct _CallbackRec { } CallbackRec, *CallbackPtr; typedef struct _CallbackList { - CallbackFuncsRec funcs; int inCallback; Bool deleted; int numDeleted; |