aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libucl
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libucl')
-rw-r--r--contrib/libucl/khash.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/libucl/khash.h b/contrib/libucl/khash.h
index afc3ce3ef..a91db5b2a 100644
--- a/contrib/libucl/khash.h
+++ b/contrib/libucl/khash.h
@@ -576,6 +576,13 @@ static kh_inline khint_t __ac_Wang_hash(khint_t key)
code; \
} }
+#define kh_foreach_value_ptr(h, pvvar, code) { khint_t __i; \
+ for (__i = kh_begin(h); __i != kh_end(h); ++__i) { \
+ if (!kh_exist(h,__i)) continue; \
+ (pvvar) = &kh_val(h,__i); \
+ code; \
+ } }
+
/* More conenient interfaces */
/*! @function