diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-04-06 12:55:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-04-06 13:33:02 +0300 |
commit | dd129125b6f6c9fff5ef4423b221cf68fedbd188 (patch) | |
tree | d88d9cd1ffb7130b2950c8e3c675d55b8ded183c /source/blender/blenlib/BLI_ghash.h | |
parent | 3639a70eaec1d49e5634f2cd5f6d4ecb7d79ef14 (diff) |
GHash: ensure function, avoids multiple lookups
Diffstat (limited to 'source/blender/blenlib/BLI_ghash.h')
-rw-r--r-- | source/blender/blenlib/BLI_ghash.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h index 16d18ef1315..a00ddeefb2b 100644 --- a/source/blender/blenlib/BLI_ghash.h +++ b/source/blender/blenlib/BLI_ghash.h @@ -79,6 +79,7 @@ bool BLI_ghash_reinsert(GHash *gh, void *key, void *val, GHashKeyFreeFP keyfre void *BLI_ghash_lookup(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT; void *BLI_ghash_lookup_default(GHash *gh, const void *key, void *val_default) ATTR_WARN_UNUSED_RESULT; void **BLI_ghash_lookup_p(GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT; +bool BLI_ghash_ensure_p(GHash *gh, void *key, void ***r_val) ATTR_WARN_UNUSED_RESULT; bool BLI_ghash_remove(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp); void BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp); void BLI_ghash_clear_ex(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp, |