Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mruby-exit.c
Go to the documentation of this file.
1 #include <stdlib.h>
2 #include "mruby.h"
3 
4 static mrb_value
5 f_exit(mrb_state *mrb, mrb_value self)
6 {
7  mrb_int i = EXIT_SUCCESS;
8 
9  mrb_get_args(mrb, "|i", &i);
10  exit(i);
11  /* not reached */
12  return mrb_nil_value();
13 }
14 
15 void
17 {
18  mrb_define_method(mrb, mrb->kernel_module, "exit", f_exit, MRB_ARGS_REQ(1));
19 }
20 
21 void
23 {
24 }