[Groonga-commit] groonga/groonga at 61bcd0e [master] mrb: bind expr_code.flags

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jun 16 23:36:51 JST 2014


Kouhei Sutou	2014-06-16 23:36:51 +0900 (Mon, 16 Jun 2014)

  New Revision: 61bcd0ed4c0e7ca018d5b4ba6c0858a480427067
  https://github.com/groonga/groonga/commit/61bcd0ed4c0e7ca018d5b4ba6c0858a480427067

  Message:
    mrb: bind expr_code.flags

  Modified files:
    lib/mrb/mrb_expr.c

  Modified: lib/mrb/mrb_expr.c (+11 -0)
===================================================================
--- lib/mrb/mrb_expr.c    2014-06-16 23:33:24 +0900 (c1afd37)
+++ lib/mrb/mrb_expr.c    2014-06-16 23:36:51 +0900 (853c674)
@@ -489,6 +489,15 @@ mrb_grn_expr_code_get_op(mrb_state *mrb, mrb_value self)
 }
 
 static mrb_value
+mrb_grn_expr_code_get_flags(mrb_state *mrb, mrb_value self)
+{
+  grn_expr_code *expr_code;
+
+  expr_code = DATA_PTR(self);
+  return mrb_fixnum_value(expr_code->flags);
+}
+
+static mrb_value
 mrb_grn_expression_initialize(mrb_state *mrb, mrb_value self)
 {
   mrb_value mrb_expression_ptr;
@@ -576,6 +585,8 @@ grn_mrb_expr_init(grn_ctx *ctx)
                     mrb_grn_expr_code_get_value, MRB_ARGS_NONE());
   mrb_define_method(mrb, klass, "op",
                     mrb_grn_expr_code_get_op, MRB_ARGS_NONE());
+  mrb_define_method(mrb, klass, "flags",
+                    mrb_grn_expr_code_get_flags, MRB_ARGS_NONE());
 
   klass = mrb_define_class_under(mrb, module, "Expression", object_class);
   MRB_SET_INSTANCE_TT(klass, MRB_TT_DATA);
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index