diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-09-02 06:58:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-09-02 06:58:53 +0400 |
commit | d59b4752e432aa1188fe9082a99d3aa6f6d59ab1 (patch) | |
tree | 9ab4bc85f012d41d4addf4289f2da9b4ba4260a6 /source/blender/blenlib/intern/BLI_ghash.c | |
parent | 26cbf331a858db0ac49e2de8b60ae7710a8c7c66 (diff) |
add hash iterator functions to access the pointer to the value.
Diffstat (limited to 'source/blender/blenlib/intern/BLI_ghash.c')
-rw-r--r-- | source/blender/blenlib/intern/BLI_ghash.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index 750202c509d..7b50e9012a8 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -602,6 +602,18 @@ void *BLI_ghashIterator_getValue(GHashIterator *ghi) } /** + * Retrieve the value from an iterator. + * + * \param ghi The iterator. + * \return The value at the current index, or NULL if the + * iterator is done. + */ +void **BLI_ghashIterator_getValue_p(GHashIterator *ghi) +{ + return ghi->curEntry ? &ghi->curEntry->val : NULL; +} + +/** * Steps the iterator to the next index. * * \param ghi The iterator. |