summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/util/u_handle_table.h
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-03-12 22:39:13 +0000
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-03-13 10:23:02 +0000
commit192d1cbbdf9f8e2527ef38761195a87517c2d244 (patch)
tree8ed45b19257752698f784fbbb5d0f04fff77c769 /src/gallium/auxiliary/util/u_handle_table.h
parent92523ad0fd11ff532f1e0642410d0a623fe53b06 (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.h11
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.