Kouhei Sutou
null+****@clear*****
Wed Feb 3 18:03:46 JST 2016
Kouhei Sutou 2016-02-03 18:03:46 +0900 (Wed, 03 Feb 2016) New Revision: 08f01bd63c88123c1943bf6a69862653f41ead08 https://github.com/groonga/groonga/commit/08f01bd63c88123c1943bf6a69862653f41ead08 Message: hash: export (max) total key size to Groonga internal Modified files: lib/grn_hash.h lib/hash.c Modified: lib/grn_hash.h (+3 -0) =================================================================== --- lib/grn_hash.h 2016-02-03 17:43:25 +0900 (4ec93d8) +++ lib/grn_hash.h 2016-02-03 18:03:46 +0900 (3a0637c) @@ -365,6 +365,9 @@ grn_id grn_array_at(grn_ctx *ctx, grn_array *array, grn_id id); void grn_hash_check(grn_ctx *ctx, grn_hash *hash); +uint64_t grn_hash_total_key_size(grn_ctx *ctx, grn_hash *hash); +uint64_t grn_hash_max_total_key_size(grn_ctx *ctx, grn_hash *hash); + #ifdef __cplusplus } #endif Modified: lib/hash.c (+12 -0) =================================================================== --- lib/hash.c 2016-02-03 17:43:25 +0900 (77c3e92) +++ lib/hash.c 2016-02-03 18:03:46 +0900 (4b4d3fa) @@ -3589,3 +3589,15 @@ grn_rhash_subrec_info(grn_hash *s, grn_id rh, int index, return GRN_SUCCESS; } #endif /* USE_GRN_INDEX2 */ + +uint64_t +grn_hash_total_key_size(grn_ctx *ctx, grn_hash *hash) +{ + return hash->header.common->curr_key; +} + +uint64_t +grn_hash_max_total_key_size(grn_ctx *ctx, grn_hash *hash) +{ + return GRN_HASH_KEY_MAX_TOTAL_SIZE; +} -------------- next part -------------- HTML����������������������������...Download