diff options
Diffstat (limited to 'libglusterfs/src/dict.h')
-rw-r--r-- | libglusterfs/src/dict.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libglusterfs/src/dict.h b/libglusterfs/src/dict.h index e481330d6b..d0b05172c2 100644 --- a/libglusterfs/src/dict.h +++ b/libglusterfs/src/dict.h @@ -60,10 +60,13 @@ typedef struct _data_pair data_pair_t; \ } while (0) -#define DICT_KEY_VALUE_MAX_SIZE 1048576 - #define dict_foreach_inline(d, c) for (c = d->members_list; c; c = c->next) +#define DICT_KEY_VALUE_MAX_SIZE 1048576 +#define DICT_MAX_FLAGS 256 +#define DICT_FLAG_SET 1 +#define DICT_FLAG_CLEAR 0 + struct _data { unsigned char is_static:1; unsigned char is_const:1; @@ -227,6 +230,10 @@ GF_MUST_CHECK int dict_set_uint32 (dict_t *this, char *key, uint32_t val); GF_MUST_CHECK int dict_get_uint64 (dict_t *this, char *key, uint64_t *val); GF_MUST_CHECK int dict_set_uint64 (dict_t *this, char *key, uint64_t val); +GF_MUST_CHECK int dict_check_flag (dict_t *this, char *key, int flag); +GF_MUST_CHECK int dict_set_flag (dict_t *this, char *key, int flag); +GF_MUST_CHECK int dict_clear_flag (dict_t *this, char *key, int flag); + GF_MUST_CHECK int dict_get_double (dict_t *this, char *key, double *val); GF_MUST_CHECK int dict_set_double (dict_t *this, char *key, double val); |