diff options
author | Tavian Barnes <tavianator@gmail.com> | 2010-04-29 16:21:55 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2010-04-30 09:52:26 -0600 |
commit | aeaa9a4e80244a5c66b1afe7e6ee1bcf48e70766 (patch) | |
tree | df6be7525af3e537e22beb13649a473434628835 /libdimension/dimension/array.h | |
parent | 3133fafb0fbd44d687d5549a060260dd7fb93bcf (diff) | |
download | dimension-aeaa9a4e80244a5c66b1afe7e6ee1bcf48e70766.tar.xz |
Add a generic list type.
Diffstat (limited to 'libdimension/dimension/array.h')
-rw-r--r-- | libdimension/dimension/array.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libdimension/dimension/array.h b/libdimension/dimension/array.h index f840e58..e383ece 100644 --- a/libdimension/dimension/array.h +++ b/libdimension/dimension/array.h @@ -105,11 +105,11 @@ dmnsn_array_set(dmnsn_array *array, size_t i, const void *obj) /* Element access */ DMNSN_INLINE void * -dmnsn_array_at(dmnsn_array *array, size_t i) +dmnsn_array_at(const dmnsn_array *array, size_t i) { if (i >= dmnsn_array_size(array)) { /* Resize if i is out of range */ - dmnsn_array_resize(array, i + 1); + dmnsn_error(DMNSN_SEVERITY_HIGH, "Array index out of bounds."); } return (char *)array->ptr + array->obj_size*i; } |