summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-08-01 14:55:47 -0600
committerTavian Barnes <tavianator@gmail.com>2010-08-01 14:55:47 -0600
commit35c72fa8f2ccfd934e54185763c2c207963e1c57 (patch)
treeaa71852e077f08e4931ebe967a5e3af78861083a /libdimension/dimension
parent52148d309a9588f5c3a14695133d6a6182c1b8d0 (diff)
downloaddimension-35c72fa8f2ccfd934e54185763c2c207963e1c57.tar.xz
Optimize PR-tree construction a bit.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/list.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libdimension/dimension/list.h b/libdimension/dimension/list.h
index 19ce3c8..bac9740 100644
--- a/libdimension/dimension/list.h
+++ b/libdimension/dimension/list.h
@@ -123,6 +123,14 @@ dmnsn_list_get(const dmnsn_list_iterator *i, void *obj)
memcpy(obj, i->ptr, i->obj_size);
}
+/* Get a pointer to the i'th object */
+DMNSN_INLINE void *
+dmnsn_list_at(const dmnsn_list_iterator *i)
+{
+ dmnsn_assert(i, "NULL list iterator.");
+ return i->ptr;
+}
+
/* Set the i'th object, expanding the list if necessary */
DMNSN_INLINE void
dmnsn_list_set(dmnsn_list_iterator *i, const void *obj)