diff options
Diffstat (limited to 'src/mapi/mapi/table.h')
-rw-r--r-- | src/mapi/mapi/table.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mapi/mapi/table.h b/src/mapi/mapi/table.h index ca2be568c70..d84523f7777 100644 --- a/src/mapi/mapi/table.h +++ b/src/mapi/mapi/table.h @@ -30,9 +30,8 @@ #define _TABLE_H_ #include "u_compiler.h" -#include "stub.h" +#include "entry.h" -#define MAPI_TMP_DEFINES #define MAPI_TMP_TABLE #include "mapi_tmp.h" @@ -51,24 +50,23 @@ table_get_noop(void) } /** - * Update the dispatch table to dispatch a stub to the given function. + * Set the function of a slot. */ static INLINE void -table_set_func(struct mapi_table *tbl, - const struct mapi_stub *stub, mapi_func func) +table_set_func(struct mapi_table *tbl, int slot, mapi_func func) { mapi_func *funcs = (mapi_func *) tbl; - funcs[stub->slot] = func; + funcs[slot] = func; } /** - * Return the dispatched function of a stub. + * Return the function of a slot. */ static INLINE mapi_func -table_get_func(const struct mapi_table *tbl, const struct mapi_stub *stub) +table_get_func(const struct mapi_table *tbl, int slot) { const mapi_func *funcs = (const mapi_func *) tbl; - return funcs[stub->slot]; + return funcs[slot]; } #endif /* _TABLE_H_ */ |