diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2014-05-06 21:23:55 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2014-05-06 21:26:35 -0400 |
commit | ef98e35c9c44148611aa2c23325431d19405c781 (patch) | |
tree | 885b5485c115be24d74713b2af9e61357fcc9039 /libdimension/map.c | |
parent | b9ffc8ca0a2f130a869ba780eeea6787760e860a (diff) | |
download | dimension-ef98e35c9c44148611aa2c23325431d19405c781.tar.xz |
malloc: New DMNSN_MALLOC() macro to save a sizeof().
Diffstat (limited to 'libdimension/map.c')
-rw-r--r-- | libdimension/map.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libdimension/map.c b/libdimension/map.c index 37f3c0f..963f170 100644 --- a/libdimension/map.c +++ b/libdimension/map.c @@ -1,5 +1,5 @@ /************************************************************************* - * Copyright (C) 2010-2011 Tavian Barnes <tavianator@tavianator.com> * + * Copyright (C) 2010-2014 Tavian Barnes <tavianator@tavianator.com> * * * * This file is part of The Dimension Library. * * * @@ -34,7 +34,7 @@ typedef struct dmnsn_map_entry { dmnsn_map * dmnsn_new_map(size_t size) { - dmnsn_map *map = dmnsn_malloc(sizeof(dmnsn_map)); + dmnsn_map *map = DMNSN_MALLOC(dmnsn_map); map->free_fn = NULL; map->obj_size = size; map->array = dmnsn_new_array(sizeof(dmnsn_map_entry) + size); |