diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2014-05-31 12:32:24 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2014-05-31 12:32:24 -0400 |
commit | c9c85a530402541518dd585de682bb0ecdf7cf7b (patch) | |
tree | 80bc7eede025cd98983c0bcb271859ceed30fa1f /libdimension/dimension | |
parent | 1de647b9d38528b640f8da473d50c04ef0674c58 (diff) | |
download | dimension-c9c85a530402541518dd585de682bb0ecdf7cf7b.tar.xz |
array: Add DMNSN_NEW_ARRAY macro.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r-- | libdimension/dimension/array.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libdimension/dimension/array.h b/libdimension/dimension/array.h index e0a0f08..6a8249f 100644 --- a/libdimension/dimension/array.h +++ b/libdimension/dimension/array.h @@ -1,5 +1,5 @@ /************************************************************************* - * Copyright (C) 2009-2010 Tavian Barnes <tavianator@tavianator.com> * + * Copyright (C) 2009-2014 Tavian Barnes <tavianator@tavianator.com> * * * * This file is part of The Dimension Library. * * * @@ -55,6 +55,13 @@ dmnsn_new_array(size_t obj_size) } /** + * Allocate an array. + * @param[in] type Type type of element to store in the array. + * @return An empty array. + */ +#define DMNSN_NEW_ARRAY(type) (dmnsn_new_array(sizeof(type))) + +/** * Delete an array. * @param[in,out] array The array to delete. */ |