Navigation Menu

Skip to content

Commit

Permalink
Add a new API: grn_plugin_proc_get_value_mode()
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jun 12, 2018
1 parent 2f114ad commit b95dc3f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/groonga/plugin.h
Expand Up @@ -216,6 +216,11 @@ GRN_API int64_t grn_plugin_proc_get_value_int64(grn_ctx *ctx,
grn_obj *value,
int64_t default_value_raw,
const char *context);
GRN_API grn_operator
grn_plugin_proc_get_value_mode(grn_ctx *ctx,
grn_obj *value,
grn_operator default_oeprator,
const char *context);

#ifdef __cplusplus
}
Expand Down
12 changes: 11 additions & 1 deletion lib/plugin.c
@@ -1,6 +1,6 @@
/* -*- c-basic-offset: 2 -*- */
/*
Copyright(C) 2012-2017 Brazil
Copyright(C) 2012-2018 Brazil
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Expand All @@ -15,6 +15,7 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "grn.h"
#include "grn_ctx_impl_mrb.h"
#include "grn_proc.h"
Expand Down Expand Up @@ -1404,3 +1405,12 @@ grn_plugin_proc_get_value_int64(grn_ctx *ctx,
{
return grn_proc_get_value_int64(ctx, value, default_value_raw, context);
}

grn_operator
grn_plugin_proc_get_value_mode(grn_ctx *ctx,
grn_obj *value,
grn_operator default_mode,
const char *context)
{
return grn_proc_get_value_mode(ctx, value, default_mode, context);
}

0 comments on commit b95dc3f

Please sign in to comment.