Skip to content

Commit

Permalink
mrb: add Groonga::ExpressionCode#modify
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 6, 2016
1 parent d209cae commit 84a3917
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/mrb/mrb_expr.c
Expand Up @@ -454,6 +454,15 @@ mrb_grn_expr_code_get_flags(mrb_state *mrb, mrb_value self)
return mrb_fixnum_value(expr_code->flags);
}

static mrb_value
mrb_grn_expr_code_get_modify(mrb_state *mrb, mrb_value self)
{
grn_expr_code *expr_code;

expr_code = DATA_PTR(self);
return mrb_fixnum_value(expr_code->modify);
}

static mrb_value
mrb_grn_expression_class_create(mrb_state *mrb, mrb_value klass)
{
Expand Down Expand Up @@ -833,6 +842,8 @@ grn_mrb_expr_init(grn_ctx *ctx)
mrb_grn_expr_code_get_op, MRB_ARGS_NONE());
mrb_define_method(mrb, klass, "flags",
mrb_grn_expr_code_get_flags, MRB_ARGS_NONE());
mrb_define_method(mrb, klass, "modify",
mrb_grn_expr_code_get_modify, MRB_ARGS_NONE());

{
struct RClass *expression_code_class = klass;
Expand Down

0 comments on commit 84a3917

Please sign in to comment.