Kouhei Sutou
null+****@clear*****
Wed Feb 1 23:20:07 JST 2017
Kouhei Sutou 2017-02-01 23:20:07 +0900 (Wed, 01 Feb 2017) New Revision: 5925833ca7e1971ad1139d2539c0a4430a1b622f https://github.com/groonga/groonga/commit/5925833ca7e1971ad1139d2539c0a4430a1b622f Message: Add grn_ii_get_n_elements() Modified files: include/groonga/ii.h lib/ii.c Modified: include/groonga/ii.h (+3 -1) =================================================================== --- include/groonga/ii.h 2017-02-02 22:58:45 +0900 (9f59e90) +++ include/groonga/ii.h 2017-02-01 23:20:07 +0900 (fc4f31c) @@ -1,5 +1,5 @@ /* - Copyright(C) 2009-2016 Brazil + Copyright(C) 2009-2017 Brazil This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -27,6 +27,8 @@ extern "C" { typedef struct _grn_ii grn_ii; typedef struct _grn_ii_buffer grn_ii_buffer; +GRN_API uint32_t grn_ii_get_n_elements(grn_ctx *ctx, grn_ii *ii); + GRN_API void grn_ii_cursor_set_min_enable_set(grn_bool enable); GRN_API grn_bool grn_ii_cursor_set_min_enable_get(void); Modified: lib/ii.c (+10 -0) =================================================================== --- lib/ii.c 2017-02-02 22:58:45 +0900 (9749755) +++ lib/ii.c 2017-02-01 23:20:07 +0900 (eca9b0c) @@ -4439,6 +4439,16 @@ grn_ii_get_flags(grn_ctx *ctx, grn_ii *ii) return ii->header->flags; } +uint32_t +grn_ii_get_n_elements(grn_ctx *ctx, grn_ii *ii) +{ + if (!ii) { + return 0; + } + + return ii->n_elements; +} + void grn_ii_expire(grn_ctx *ctx, grn_ii *ii) { -------------- next part -------------- HTML����������������������������...Download