Ruby
1.9.3p392(2013-02-22revision39386)
Main Page
Modules
Data Structures
Files
File List
Globals
internal.h
Go to the documentation of this file.
1
/**********************************************************************
2
3
internal.h -
4
5
$Author$
6
created at: Tue May 17 11:42:20 JST 2011
7
8
Copyright (C) 2011 Yukihiro Matsumoto
9
10
**********************************************************************/
11
12
#ifndef RUBY_INTERNAL_H
13
#define RUBY_INTERNAL_H 1
14
15
#if defined(__cplusplus)
16
extern
"C"
{
17
#if 0
18
}
/* satisfy cc-mode */
19
#endif
20
#endif
21
22
struct
rb_deprecated_classext_struct
{
23
char
conflict
[
sizeof
(
VALUE
) * 3];
24
};
25
26
struct
rb_classext_struct
{
27
VALUE
super
;
28
struct
st_table
*
iv_tbl
;
29
struct
st_table
*
const_tbl
;
30
};
31
32
#undef RCLASS_SUPER
33
#define RCLASS_EXT(c) (RCLASS(c)->ptr)
34
#define RCLASS_SUPER(c) (RCLASS_EXT(c)->super)
35
#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
36
#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
37
#define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
38
#define RCLASS_IV_INDEX_TBL(c) (RCLASS(c)->iv_index_tbl)
39
40
struct
vtm
;
/* defined by timev.h */
41
42
/* array.c */
43
VALUE
rb_ary_last
(
int
,
VALUE
*,
VALUE
);
44
45
/* bignum.c */
46
VALUE
rb_big_fdiv
(
VALUE
x,
VALUE
y);
47
VALUE
rb_big_uminus
(
VALUE
x);
48
49
/* class.c */
50
VALUE
rb_obj_methods
(
int
argc
,
VALUE
*
argv
,
VALUE
obj);
51
VALUE
rb_obj_protected_methods
(
int
argc
,
VALUE
*
argv
,
VALUE
obj);
52
VALUE
rb_obj_private_methods
(
int
argc
,
VALUE
*
argv
,
VALUE
obj);
53
VALUE
rb_obj_public_methods
(
int
argc
,
VALUE
*
argv
,
VALUE
obj);
54
int
rb_obj_basic_to_s_p
(
VALUE
);
55
void
Init_class_hierarchy
(
void
);
56
57
/* compile.c */
58
int
rb_dvar_defined
(
ID
);
59
int
rb_local_defined
(
ID
);
60
int
rb_parse_in_eval
(
void
);
61
int
rb_parse_in_main
(
void
);
62
VALUE
rb_insns_name_array
(
void
);
63
64
/* cont.c */
65
VALUE
rb_obj_is_fiber
(
VALUE
);
66
void
rb_fiber_reset_root_local_storage
(
VALUE
);
67
68
/* debug.c */
69
PRINTF_ARGS
(
void
ruby_debug_printf
(
const
char
*, ...), 1, 2);
70
71
/* dmyext.c */
72
void
Init_ext
(
void
);
73
74
/* encoding.c */
75
ID
rb_id_encoding
(
void
);
76
77
/* encoding.c */
78
void
rb_gc_mark_encodings
(
void
);
79
80
/* error.c */
81
NORETURN
(
PRINTF_ARGS
(
void
rb_compile_bug
(
const
char
*,
int
,
const
char
*, ...), 3, 4));
82
VALUE
rb_check_backtrace
(
VALUE
);
83
NORETURN
(
void
rb_async_bug_errno
(
const
char
*,
int
));
84
85
/* eval_error.c */
86
void
ruby_error_print
(
void
);
87
VALUE
rb_get_backtrace
(
VALUE
info);
88
89
/* eval_jump.c */
90
void
rb_call_end_proc
(
VALUE
data);
91
92
/* file.c */
93
VALUE
rb_home_dir
(
const
char
*user,
VALUE
result
);
94
VALUE
rb_realpath_internal
(
VALUE
basedir,
VALUE
path,
int
strict);
95
VALUE
rb_file_expand_path_fast
(
VALUE
,
VALUE
);
96
VALUE
rb_file_expand_path_internal
(
VALUE
,
VALUE
,
int
,
int
,
VALUE
);
97
void
Init_File
(
void
);
98
99
#ifdef _WIN32
100
/* file.c, win32/file.c */
101
void
rb_w32_init_file
(
void
);
102
#endif
103
104
/* gc.c */
105
void
Init_heap
(
void
);
106
107
/* inits.c */
108
void
rb_call_inits
(
void
);
109
110
/* io.c */
111
const
char
*
ruby_get_inplace_mode
(
void
);
112
void
ruby_set_inplace_mode
(
const
char
*);
113
ssize_t
rb_io_bufread
(
VALUE
io,
void
*
buf
,
size_t
size
);
114
void
rb_stdio_set_default_encoding
(
void
);
115
116
/* iseq.c */
117
VALUE
rb_iseq_compile_with_option
(
VALUE
src,
VALUE
file,
VALUE
filepath,
VALUE
line,
VALUE
opt);
118
VALUE
rb_iseq_clone
(
VALUE
iseqval,
VALUE
newcbase);
119
120
/* load.c */
121
VALUE
rb_get_load_path
(
void
);
122
123
/* math.c */
124
VALUE
rb_math_atan2
(
VALUE
,
VALUE
);
125
VALUE
rb_math_cos
(
VALUE
);
126
VALUE
rb_math_cosh
(
VALUE
);
127
VALUE
rb_math_exp
(
VALUE
);
128
VALUE
rb_math_hypot
(
VALUE
,
VALUE
);
129
VALUE
rb_math_log
(
int
argc
,
VALUE
*
argv
);
130
VALUE
rb_math_sin
(
VALUE
);
131
VALUE
rb_math_sinh
(
VALUE
);
132
VALUE
rb_math_sqrt
(
VALUE
);
133
134
/* newline.c */
135
void
Init_newline
(
void
);
136
137
/* numeric.c */
138
int
rb_num_to_uint
(
VALUE
val,
unsigned
int
*ret);
139
int
ruby_float_step
(
VALUE
from,
VALUE
to,
VALUE
step,
int
excl);
140
double
ruby_float_mod
(
double
x,
double
y);
141
142
/* object.c */
143
VALUE
rb_obj_equal
(
VALUE
obj1,
VALUE
obj2);
144
145
/* parse.y */
146
VALUE
rb_parser_get_yydebug
(
VALUE
);
147
VALUE
rb_parser_set_yydebug
(
VALUE
,
VALUE
);
148
149
/* proc.c */
150
VALUE
rb_proc_location
(
VALUE
self
);
151
152
/* rational.c */
153
VALUE
rb_lcm
(
VALUE
x,
VALUE
y);
154
VALUE
rb_rational_reciprocal
(
VALUE
x);
155
156
/* re.c */
157
VALUE
rb_reg_compile
(
VALUE
str,
int
options
,
const
char
*sourcefile,
int
sourceline);
158
VALUE
rb_reg_check_preprocess
(
VALUE
);
159
160
/* signal.c */
161
int
rb_get_next_signal
(
void
);
162
163
/* strftime.c */
164
size_t
rb_strftime_timespec
(
char
*s,
size_t
maxsize,
const
char
*format,
const
struct
vtm
*
vtm
,
struct
timespec
*ts,
int
gmt);
165
166
/* string.c */
167
int
rb_str_buf_cat_escaped_char
(
VALUE
result
,
unsigned
int
c,
int
unicode_p);
168
169
/* struct.c */
170
VALUE
rb_struct_init_copy
(
VALUE
copy,
VALUE
s);
171
172
/* time.c */
173
struct
timeval
rb_time_timeval
(
VALUE
);
174
175
/* thread.c */
176
VALUE
rb_obj_is_mutex
(
VALUE
obj);
177
VALUE
ruby_suppress_tracing
(
VALUE
(*
func
)(
VALUE
,
int
),
VALUE
arg
,
int
always);
178
void
rb_thread_execute_interrupts
(
VALUE
th);
179
void
rb_clear_trace_func
(
void
);
180
VALUE
rb_thread_backtrace
(
VALUE
thval);
181
VALUE
rb_get_coverages
(
void
);
182
183
/* thread_pthread.c, thread_win32.c */
184
void
Init_native_thread
(
void
);
185
186
/* vm.c */
187
VALUE
rb_obj_is_thread
(
VALUE
obj);
188
void
rb_vm_mark
(
void
*ptr);
189
void
Init_BareVM
(
void
);
190
VALUE
rb_vm_top_self
(
void
);
191
void
rb_thread_recycle_stack_release
(
VALUE
*);
192
void
rb_vm_change_state
(
void
);
193
void
rb_vm_inc_const_missing_count
(
void
);
194
void
rb_thread_mark
(
void
*th);
195
const
void
**
rb_vm_get_insns_address_table
(
void
);
196
197
/* vm_dump.c */
198
void
rb_vm_bugreport
(
void
);
199
200
/* vm_eval.c */
201
void
Init_vm_eval
(
void
);
202
VALUE
rb_current_realfilepath
(
void
);
203
204
/* vm_method.c */
205
void
Init_eval_method
(
void
);
206
207
/* miniprelude.c, prelude.c */
208
void
Init_prelude
(
void
);
209
210
#if defined __GNUC__ && __GNUC__ >= 4
211
#pragma GCC visibility push(default)
212
#endif
213
const
char
*
rb_objspace_data_type_name
(
VALUE
obj);
214
215
/* Temporary. This API will be removed (renamed). */
216
VALUE
rb_thread_io_blocking_region
(
rb_blocking_function_t
*
func
,
void
*data1,
int
fd);
217
218
/* experimental.
219
* These APIs can be changed on Ruby 1.9.4 or later.
220
* We will change these APIs (spac, name and so on) if there are something wrong.
221
* If you use these APIs, catch up future changes.
222
*/
223
void
*
rb_thread_call_with_gvl
(
void
*(*
func
)(
void
*),
void
*data1);
224
VALUE
rb_thread_call_without_gvl
(
225
rb_blocking_function_t
*
func
,
void
*data1,
226
rb_unblock_function_t
*ubf,
void
*data2);
227
228
#if defined __GNUC__ && __GNUC__ >= 4
229
#pragma GCC visibility pop
230
#endif
231
232
#if defined(__cplusplus)
233
#if 0
234
{
/* satisfy cc-mode */
235
#endif
236
}
/* extern "C" { */
237
#endif
238
239
#endif
/* RUBY_INTERNAL_H */
240
Generated on Tue Feb 26 2013 08:43:03 for Ruby by
1.8.3