Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
kernel.c
Go to the documentation of this file.
1 /*
2 ** kernel.c - Kernel module suppliment
3 **
4 ** See Copyright Notice in mruby.h
5 */
6 
7 #include "mruby.h"
8 
9 mrb_value mrb_f_sprintf(mrb_state *mrb, mrb_value obj); /* in sprintf.c */
10 
11 void
13 {
14  struct RClass *krn;
15 
16  if (mrb->kernel_module == NULL) {
17  mrb->kernel_module = mrb_define_module(mrb, "Kernel"); /* Might be PARANOID. */
18  }
19  krn = mrb->kernel_module;
20 
21  mrb_define_method(mrb, krn, "sprintf", mrb_f_sprintf, MRB_ARGS_ANY());
22  mrb_define_method(mrb, krn, "format", mrb_f_sprintf, MRB_ARGS_ANY());
23 }
24 
25 void
27 {
28  /* nothing to do. */
29 }
30