Groonga
Loading...
Searching...
No Matches
option.h
Go to the documentation of this file.
1/*
2 Copyright(C) 2018 Brazil
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17*/
18
19#pragma once
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25typedef void * grn_option_revision;
26#define GRN_OPTION_REVISION_NONE ((grn_option_revision)0)
27#define GRN_OPTION_REVISION_UNCHANGED ((grn_option_revision)1)
28
29#define GRN_OPTION_VALUES_EACH_BEGIN(ctx, \
30 option_values, \
31 i, \
32 name, \
33 name_size) do { \
34 grn_ctx *ctx_ = (ctx); \
35 grn_obj *option_values_ = (option_values); \
36 unsigned int i_, n_; \
37 \
38 n_ = grn_vector_size(ctx_, option_values_); \
39 for (i_ = 0; i_ < n_; i_ += 2) { \
40 unsigned int i = i_ + 1; \
41 const char *name; \
42 unsigned int name_size; \
43 grn_id name_domain_; \
44 \
45 name_size = grn_vector_get_element(ctx_, \
46 option_values_, \
47 i_, \
48 &name, \
49 NULL, \
50 &name_domain_); \
51 if (!grn_type_id_is_text_family(ctx_, name_domain_)) { \
52 continue; \
53 }
54
55#define GRN_OPTION_VALUES_EACH_END() \
56 } \
57} while (false)
58
59#ifdef __cplusplus
60}
61#endif
void * grn_option_revision
Definition option.h:25