diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-03-12 22:39:13 +0000 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-03-13 10:23:02 +0000 |
commit | 192d1cbbdf9f8e2527ef38761195a87517c2d244 (patch) | |
tree | 8ed45b19257752698f784fbbb5d0f04fff77c769 /src/gallium/auxiliary/util/u_handle_table.h | |
parent | 92523ad0fd11ff532f1e0642410d0a623fe53b06 (diff) |
gallium: Add a new handle_table_set that accepts an arbitrary handle.
Diffstat (limited to 'src/gallium/auxiliary/util/u_handle_table.h')
-rw-r--r-- | src/gallium/auxiliary/util/u_handle_table.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_handle_table.h b/src/gallium/auxiliary/util/u_handle_table.h index 51fc273865..a2f1f604ad 100644 --- a/src/gallium/auxiliary/util/u_handle_table.h +++ b/src/gallium/auxiliary/util/u_handle_table.h @@ -26,6 +26,7 @@ **************************************************************************/ /** + * @file * Generic handle table. * * @author José Fonseca <jrfonseca@tungstengraphics.com> @@ -42,6 +43,8 @@ extern "C" { /** * Abstract data type to map integer handles to objects. + * + * Also referred as "pointer array". */ struct handle_table; @@ -71,6 +74,14 @@ handle_table_add(struct handle_table *ht, void *object); /** + * Returns zero on failure (out of memory). + */ +unsigned +handle_table_set(struct handle_table *ht, + unsigned handle, + void *object); + +/** * Fetch an existing object. * * Returns NULL for an invalid handle. |