Ruby
1.9.3p448(2013-06-27revision41675)
Main Page
Modules
Data Structures
Files
File List
Globals
goruby.c
Go to the documentation of this file.
1
void
Init_golf
(
void
);
2
#define ruby_run_node goruby_run_node
3
#include "
main.c
"
4
#undef ruby_run_node
5
6
RUBY_EXTERN
int
ruby_run_node
(
void
*);
7
RUBY_EXTERN
void
ruby_init_ext
(
const
char
*
name
,
void
(*
init
)(
void
));
8
9
static
VALUE
10
init_golf
(
VALUE
arg
)
11
{
12
ruby_init_ext
(
"golf"
,
Init_golf
);
13
return
arg
;
14
}
15
16
int
17
goruby_run_node
(
void
*
arg
)
18
{
19
int
state
;
20
if
(
NIL_P
(
rb_protect
(
init_golf
,
Qtrue
, &state))) {
21
return
state ==
EXIT_SUCCESS
?
EXIT_FAILURE
:
state
;
22
}
23
return
ruby_run_node
(arg);
24
}
main.c
Qtrue
#define Qtrue
Definition:
ruby.h:366
rb_protect
VALUE rb_protect(VALUE(*proc)(VALUE), VALUE data, int *state)
Definition:
eval.c:704
Init_golf
void Init_golf(void)
Definition:
golf_prelude.c:147
ruby_init_ext
RUBY_EXTERN void ruby_init_ext(const char *name, void(*init)(void))
Definition:
load.c:668
NIL_P
#define NIL_P(v)
Definition:
ruby.h:374
arg
arg
Definition:
ripper.y:1283
EXIT_FAILURE
#define EXIT_FAILURE
Definition:
eval_intern.h:24
init
#define init(n)
Definition:
init.c:3
EXIT_SUCCESS
#define EXIT_SUCCESS
Definition:
error.c:29
VALUE
unsigned long VALUE
Definition:
ruby.h:88
init_golf
static VALUE init_golf(VALUE arg)
Definition:
goruby.c:10
ruby_run_node
#define ruby_run_node
Definition:
goruby.c:2
goruby_run_node
int goruby_run_node(void *arg)
Definition:
goruby.c:17
RUBY_EXTERN
#define RUBY_EXTERN
Definition:
defines.h:258
name
const char * name
Definition:
nkf.c:208
state
state
Definition:
gb18030.c:213
Generated on Thu Jul 31 2014 19:14:25 for Ruby by
1.8.7