diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-12-24 13:49:01 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-12-24 17:28:52 +0800 |
commit | 897bff67734ec9ab213191386cdf09ddd051aebb (patch) | |
tree | c2ab54441b42333b8e501158317f05698607444f /src/mapi/mapi/table.h | |
parent | 0c205484bfe3de23c370deeba43dff7939179b5a (diff) |
mapi: Make struct mapi_stub opaque.
Add accessors for struct mapi_stub and make it opaque.
Diffstat (limited to 'src/mapi/mapi/table.h')
-rw-r--r-- | src/mapi/mapi/table.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mapi/mapi/table.h b/src/mapi/mapi/table.h index ca2be568c7..174057d642 100644 --- a/src/mapi/mapi/table.h +++ b/src/mapi/mapi/table.h @@ -51,24 +51,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_ */ |