GET_INTERFACE seems overcomplicated and error prone. It requires the first two parameters to match up - when in every use the second is a second macro with no other use that calls a third with the first parameter. Confused?
Current usage: GET_INTERFACE (CCSContextInterface, CCS_CONTEXT_INTERFACE_TYPE, context)) Suggest usage: GET_INTERFACE (CCSContextInterface, context))
Current #define GET_INTERFACE(CType,IType, o) (CType *) ccsObjectGetInterface ((CCSObject *) o, IType) Suggest #define GET_INTERFACE(CType, o) (CType*)ccsObjectGetInterface((CCSObject*) o, GET_INTERFACE_TYPE(CType))
And get rid of CCS_CONTEXT_INTERFACE_TYPE which is then unused.
« Back to merge proposal
GET_INTERFACE seems overcomplicated and error prone. It requires the first two parameters to match up - when in every use the second is a second macro with no other use that calls a third with the first parameter. Confused?
Current usage: GET_INTERFACE (CCSContextInte rface, CCS_CONTEXT_ INTERFACE_ TYPE, context)) rface, context))
Suggest usage: GET_INTERFACE (CCSContextInte
Current #define GET_INTERFACE( CType,IType, o) (CType *) ccsObjectGetInt erface ((CCSObject *) o, IType) CType, o) (CType* )ccsObjectGetIn terface( (CCSObject* ) o, GET_INTERFACE_ TYPE(CType) )
Suggest #define GET_INTERFACE(
And get rid of CCS_CONTEXT_ INTERFACE_ TYPE which is then unused.