[Groonga-commit] groonga/groonga at 479621f [master] mrb: add Groonga::FixedSizeColumn

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Dec 3 23:38:01 JST 2013


Kouhei Sutou	2013-12-03 23:38:01 +0900 (Tue, 03 Dec 2013)

  New Revision: 479621f2fd5eea60f7da29f536644007e65a120e
  https://github.com/groonga/groonga/commit/479621f2fd5eea60f7da29f536644007e65a120e

  Message:
    mrb: add Groonga::FixedSizeColumn

  Added files:
    lib/mrb/mrb_fixed_size_column.c
    lib/mrb/mrb_fixed_size_column.h
  Modified files:
    lib/ctx_impl_mrb.c
    lib/mrb/sources.am

  Modified: lib/ctx_impl_mrb.c (+2 -0)
===================================================================
--- lib/ctx_impl_mrb.c    2013-12-02 13:06:26 +0900 (3e7edd1)
+++ lib/ctx_impl_mrb.c    2013-12-03 23:38:01 +0900 (cffdf54)
@@ -22,6 +22,7 @@
 #include "mrb/mrb_ctx.h"
 #include "mrb/mrb_obj.h"
 #include "mrb/mrb_column.h"
+#include "mrb/mrb_fixed_size_column.h"
 #include "mrb/mrb_expr.h"
 #include "mrb/mrb_accessor.h"
 
@@ -37,6 +38,7 @@ grn_ctx_impl_mrb_init_bindings(grn_ctx *ctx)
   grn_mrb_ctx_init(ctx);
   grn_mrb_obj_init(ctx);
   grn_mrb_column_init(ctx);
+  grn_mrb_fixed_size_column_init(ctx);
   grn_mrb_expr_init(ctx);
   grn_mrb_accessor_init(ctx);
 }

  Added: lib/mrb/mrb_fixed_size_column.c (+40 -0) 100644
===================================================================
--- /dev/null
+++ lib/mrb/mrb_fixed_size_column.c    2013-12-03 23:38:01 +0900 (39a0c5f)
@@ -0,0 +1,40 @@
+/* -*- c-basic-offset: 2 -*- */
+/*
+  Copyright(C) 2013 Brazil
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License version 2.1 as published by the Free Software Foundation.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  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 "../ctx_impl.h"
+
+#ifdef GRN_WITH_MRUBY
+#include <mruby.h>
+#include <mruby/class.h>
+
+#include "mrb_fixed_size_column.h"
+
+void
+grn_mrb_fixed_size_column_init(grn_ctx *ctx)
+{
+  grn_mrb_data *data = &(ctx->impl->mrb);
+  mrb_state *mrb = data->state;
+  struct RClass *module = data->module;
+  struct RClass *column_class;
+  struct RClass *klass;
+
+  column_class = mrb_class_get_under(mrb, data->object_class, "Column");
+  klass = mrb_define_class_under(mrb, module, "FixedSizeColumn", column_class);
+  MRB_SET_INSTANCE_TT(klass, MRB_TT_DATA);
+}
+#endif

  Added: lib/mrb/mrb_fixed_size_column.h (+34 -0) 100644
===================================================================
--- /dev/null
+++ lib/mrb/mrb_fixed_size_column.h    2013-12-03 23:38:01 +0900 (bb2d528)
@@ -0,0 +1,34 @@
+/* -*- c-basic-offset: 2 -*- */
+/*
+  Copyright(C) 2013 Brazil
+
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Lesser General Public
+  License version 2.1 as published by the Free Software Foundation.
+
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with this library; if not, write to the Free Software
+  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+*/
+
+#ifndef GRN_MRB_FIXED_COLUMN_H
+#define GRN_MRB_FIXED_COLUMN_H
+
+#include "../ctx.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void grn_mrb_fixed_size_column_init(grn_ctx *ctx);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRN_MRB_FIXED_SIZE_COLUMN_H */

  Modified: lib/mrb/sources.am (+2 -0)
===================================================================
--- lib/mrb/sources.am    2013-12-02 13:06:26 +0900 (8765e42)
+++ lib/mrb/sources.am    2013-12-03 23:38:01 +0900 (1eb59db)
@@ -7,5 +7,7 @@ libgrnmrb_la_SOURCES =				\
 	mrb_ctx.h				\
 	mrb_expr.c				\
 	mrb_expr.h				\
+	mrb_fixed_size_column.c			\
+	mrb_fixed_size_column.h			\
 	mrb_obj.c				\
 	mrb_obj.h
-------------- next part --------------
HTML����������������������������...
Télécharger 



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