Ruby
1.9.3p448(2013-06-27revision41675)
Main Page
Modules
Data Structures
Files
File List
Globals
include
ruby
intern.h
Go to the documentation of this file.
1
/**********************************************************************
2
3
intern.h -
4
5
$Author: usa $
6
created at: Thu Jun 10 14:22:17 JST 1993
7
8
Copyright (C) 1993-2007 Yukihiro Matsumoto
9
Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
10
Copyright (C) 2000 Information-technology Promotion Agency, Japan
11
12
**********************************************************************/
13
14
#ifndef RUBY_INTERN_H
15
#define RUBY_INTERN_H 1
16
17
#if defined(__cplusplus)
18
extern
"C"
{
19
#if 0
20
}
/* satisfy cc-mode */
21
#endif
22
#endif
23
24
#include "
ruby/defines.h
"
25
#ifdef RUBY_EXTCONF_H
26
#include RUBY_EXTCONF_H
27
#endif
28
29
#ifdef HAVE_STDARG_PROTOTYPES
30
# include <stdarg.h>
31
#else
32
# include <varargs.h>
33
#endif
34
35
#if defined(HAVE_SYS_TYPES_H)
36
#include <sys/types.h>
37
#endif
38
39
#if defined(HAVE_SYS_TIME_H)
40
#include <sys/time.h>
41
#endif
42
43
#include "
ruby/st.h
"
44
45
#if defined __GNUC__ && __GNUC__ >= 4
46
#pragma GCC visibility push(default)
47
#endif
48
49
/*
50
* Functions and variables that are used by more than one source file of
51
* the kernel.
52
*/
53
54
#define ID_ALLOCATOR 1
55
56
/* array.c */
57
void
rb_mem_clear
(
register
VALUE
*,
register
long
);
58
VALUE
rb_assoc_new
(
VALUE
,
VALUE
);
59
VALUE
rb_check_array_type
(
VALUE
);
60
VALUE
rb_ary_new
(
void
);
61
VALUE
rb_ary_new2
(
long
);
62
VALUE
rb_ary_new3
(
long
,...);
63
VALUE
rb_ary_new4
(
long
,
const
VALUE
*);
64
VALUE
rb_ary_tmp_new
(
long
);
65
void
rb_ary_free
(
VALUE
);
66
void
rb_ary_modify
(
VALUE
);
67
VALUE
rb_ary_freeze
(
VALUE
);
68
VALUE
rb_ary_aref
(
int
,
VALUE
*,
VALUE
);
69
VALUE
rb_ary_subseq
(
VALUE
,
long
,
long
);
70
void
rb_ary_store
(
VALUE
,
long
,
VALUE
);
71
VALUE
rb_ary_dup
(
VALUE
);
72
VALUE
rb_ary_resurrect
(
VALUE
ary);
73
VALUE
rb_ary_to_ary
(
VALUE
);
74
VALUE
rb_ary_to_s
(
VALUE
);
75
VALUE
rb_ary_push
(
VALUE
,
VALUE
);
76
VALUE
rb_ary_pop
(
VALUE
);
77
VALUE
rb_ary_shift
(
VALUE
);
78
VALUE
rb_ary_unshift
(
VALUE
,
VALUE
);
79
VALUE
rb_ary_entry
(
VALUE
,
long
);
80
VALUE
rb_ary_each
(
VALUE
);
81
VALUE
rb_ary_join
(
VALUE
,
VALUE
);
82
VALUE
rb_ary_reverse
(
VALUE
);
83
VALUE
rb_ary_sort
(
VALUE
);
84
VALUE
rb_ary_sort_bang
(
VALUE
);
85
VALUE
rb_ary_delete
(
VALUE
,
VALUE
);
86
VALUE
rb_ary_delete_at
(
VALUE
,
long
);
87
VALUE
rb_ary_clear
(
VALUE
);
88
VALUE
rb_ary_plus
(
VALUE
,
VALUE
);
89
VALUE
rb_ary_concat
(
VALUE
,
VALUE
);
90
VALUE
rb_ary_assoc
(
VALUE
,
VALUE
);
91
VALUE
rb_ary_rassoc
(
VALUE
,
VALUE
);
92
VALUE
rb_ary_includes
(
VALUE
,
VALUE
);
93
VALUE
rb_ary_cmp
(
VALUE
,
VALUE
);
94
VALUE
rb_ary_replace
(
VALUE
copy,
VALUE
orig);
95
VALUE
rb_get_values_at
(
VALUE
,
long
,
int
,
VALUE
*,
VALUE
(*)(
VALUE
,
long
));
96
VALUE
rb_ary_resize
(
VALUE
ary,
long
len
);
97
/* bignum.c */
98
VALUE
rb_big_new
(
long
,
int
);
99
int
rb_bigzero_p
(
VALUE
x);
100
VALUE
rb_big_clone
(
VALUE
);
101
void
rb_big_2comp
(
VALUE
);
102
VALUE
rb_big_norm
(
VALUE
);
103
void
rb_big_resize
(
VALUE
big,
long
len
);
104
VALUE
rb_uint2big
(
VALUE
);
105
VALUE
rb_int2big
(
SIGNED_VALUE
);
106
VALUE
rb_uint2inum
(
VALUE
);
107
VALUE
rb_int2inum
(
SIGNED_VALUE
);
108
VALUE
rb_cstr_to_inum
(
const
char
*,
int
,
int
);
109
VALUE
rb_str_to_inum
(
VALUE
,
int
,
int
);
110
VALUE
rb_cstr2inum
(
const
char
*,
int
);
111
VALUE
rb_str2inum
(
VALUE
,
int
);
112
VALUE
rb_big2str
(
VALUE
,
int
);
113
VALUE
rb_big2str0
(
VALUE
,
int
,
int
);
114
SIGNED_VALUE
rb_big2long
(
VALUE
);
115
#define rb_big2int(x) rb_big2long(x)
116
VALUE
rb_big2ulong
(
VALUE
);
117
#define rb_big2uint(x) rb_big2ulong(x)
118
VALUE
rb_big2ulong_pack
(
VALUE
x);
119
#if HAVE_LONG_LONG
120
VALUE
rb_ll2inum(LONG_LONG);
121
VALUE
rb_ull2inum(
unsigned
LONG_LONG);
122
LONG_LONG rb_big2ll(
VALUE
);
123
unsigned
LONG_LONG rb_big2ull(
VALUE
);
124
#endif
/* HAVE_LONG_LONG */
125
DEPRECATED
(
void
rb_quad_pack
(
char
*,
VALUE
));
126
DEPRECATED
(
VALUE
rb_quad_unpack
(
const
char
*,
int
));
127
void
rb_big_pack
(
VALUE
val,
unsigned
long
*
buf
,
long
num_longs);
128
VALUE
rb_big_unpack
(
unsigned
long
*
buf
,
long
num_longs);
129
int
rb_uv_to_utf8
(
char
[6],
unsigned
long
);
130
VALUE
rb_dbl2big
(
double
);
131
double
rb_big2dbl
(
VALUE
);
132
VALUE
rb_big_cmp
(
VALUE
,
VALUE
);
133
VALUE
rb_big_eq
(
VALUE
,
VALUE
);
134
VALUE
rb_big_eql
(
VALUE
,
VALUE
);
135
VALUE
rb_big_plus
(
VALUE
,
VALUE
);
136
VALUE
rb_big_minus
(
VALUE
,
VALUE
);
137
VALUE
rb_big_mul
(
VALUE
,
VALUE
);
138
VALUE
rb_big_div
(
VALUE
,
VALUE
);
139
VALUE
rb_big_idiv
(
VALUE
,
VALUE
);
140
VALUE
rb_big_modulo
(
VALUE
,
VALUE
);
141
VALUE
rb_big_divmod
(
VALUE
,
VALUE
);
142
VALUE
rb_big_pow
(
VALUE
,
VALUE
);
143
VALUE
rb_big_and
(
VALUE
,
VALUE
);
144
VALUE
rb_big_or
(
VALUE
,
VALUE
);
145
VALUE
rb_big_xor
(
VALUE
,
VALUE
);
146
VALUE
rb_big_lshift
(
VALUE
,
VALUE
);
147
VALUE
rb_big_rshift
(
VALUE
,
VALUE
);
148
/* rational.c */
149
VALUE
rb_rational_raw
(
VALUE
,
VALUE
);
150
#define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
151
#define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
152
VALUE
rb_rational_new
(
VALUE
,
VALUE
);
153
#define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
154
#define rb_rational_new2(x,y) rb_rational_new((x), (y))
155
VALUE
rb_Rational
(
VALUE
,
VALUE
);
156
#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
157
#define rb_Rational2(x,y) rb_Rational((x), (y))
158
/* complex.c */
159
VALUE
rb_complex_raw
(
VALUE
,
VALUE
);
160
#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
161
#define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
162
VALUE
rb_complex_new
(
VALUE
,
VALUE
);
163
#define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
164
#define rb_complex_new2(x,y) rb_complex_new((x), (y))
165
VALUE
rb_complex_polar
(
VALUE
,
VALUE
);
166
VALUE
rb_Complex
(
VALUE
,
VALUE
);
167
#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
168
#define rb_Complex2(x,y) rb_Complex((x), (y))
169
/* class.c */
170
VALUE
rb_class_boot
(
VALUE
);
171
VALUE
rb_class_new
(
VALUE
);
172
VALUE
rb_mod_init_copy
(
VALUE
,
VALUE
);
173
VALUE
rb_singleton_class_clone
(
VALUE
);
174
void
rb_singleton_class_attached
(
VALUE
,
VALUE
);
175
VALUE
rb_make_metaclass
(
VALUE
,
VALUE
);
176
void
rb_check_inheritable
(
VALUE
);
177
VALUE
rb_class_inherited
(
VALUE
,
VALUE
);
178
VALUE
rb_define_class_id
(
ID
,
VALUE
);
179
VALUE
rb_define_class_id_under
(
VALUE
,
ID
,
VALUE
);
180
VALUE
rb_module_new
(
void
);
181
VALUE
rb_define_module_id
(
ID
);
182
VALUE
rb_define_module_id_under
(
VALUE
,
ID
);
183
VALUE
rb_mod_included_modules
(
VALUE
);
184
VALUE
rb_mod_include_p
(
VALUE
,
VALUE
);
185
VALUE
rb_mod_ancestors
(
VALUE
);
186
VALUE
rb_class_instance_methods
(
int
,
VALUE
*,
VALUE
);
187
VALUE
rb_class_public_instance_methods
(
int
,
VALUE
*,
VALUE
);
188
VALUE
rb_class_protected_instance_methods
(
int
,
VALUE
*,
VALUE
);
189
VALUE
rb_class_private_instance_methods
(
int
,
VALUE
*,
VALUE
);
190
VALUE
rb_obj_singleton_methods
(
int
,
VALUE
*,
VALUE
);
191
void
rb_define_method_id
(
VALUE
,
ID
,
VALUE
(*)(
ANYARGS
),
int
);
192
void
rb_frozen_class_p
(
VALUE
);
193
void
rb_undef
(
VALUE
,
ID
);
194
void
rb_define_protected_method
(
VALUE
,
const
char
*,
VALUE
(*)(
ANYARGS
),
int
);
195
void
rb_define_private_method
(
VALUE
,
const
char
*,
VALUE
(*)(
ANYARGS
),
int
);
196
void
rb_define_singleton_method
(
VALUE
,
const
char
*,
VALUE
(*)(
ANYARGS
),
int
);
197
VALUE
rb_singleton_class
(
VALUE
);
198
/* compar.c */
199
int
rb_cmpint
(
VALUE
,
VALUE
,
VALUE
);
200
NORETURN
(
void
rb_cmperr
(
VALUE
,
VALUE
));
201
/* cont.c */
202
VALUE
rb_fiber_new
(
VALUE
(*)(
ANYARGS
),
VALUE
);
203
VALUE
rb_fiber_resume
(
VALUE
fib,
int
argc
,
VALUE
*
args
);
204
VALUE
rb_fiber_yield
(
int
argc
,
VALUE
*
args
);
205
VALUE
rb_fiber_current
(
void
);
206
VALUE
rb_fiber_alive_p
(
VALUE
);
207
/* enum.c */
208
/* enumerator.c */
209
VALUE
rb_enumeratorize
(
VALUE
,
VALUE
,
int
,
VALUE
*);
210
#define RETURN_ENUMERATOR(obj, argc, argv) do { \
211
if (!rb_block_given_p()) \
212
return rb_enumeratorize((obj), ID2SYM(rb_frame_this_func()),\
213
(argc), (argv)); \
214
} while (0)
215
/* error.c */
216
VALUE
rb_exc_new
(
VALUE
,
const
char
*,
long
);
217
VALUE
rb_exc_new2
(
VALUE
,
const
char
*);
218
VALUE
rb_exc_new3
(
VALUE
,
VALUE
);
219
PRINTF_ARGS
(
NORETURN
(
void
rb_loaderror
(
const
char
*, ...)), 1, 2);
220
PRINTF_ARGS
(
NORETURN
(
void
rb_name_error
(
ID
,
const
char
*, ...)), 2, 3);
221
NORETURN
(
void
rb_invalid_str
(
const
char
*,
const
char
*));
222
PRINTF_ARGS
(
void
rb_compile_error
(
const
char
*,
int
,
const
char
*, ...), 3, 4);
223
PRINTF_ARGS
(
void
rb_compile_error_with_enc
(
const
char
*,
int
,
void
*,
const
char
*, ...), 4, 5);
224
PRINTF_ARGS
(
void
rb_compile_error_append
(
const
char
*, ...), 1, 2);
225
NORETURN
(
void
rb_load_fail
(
const
char
*));
226
NORETURN
(
void
rb_error_frozen
(
const
char
*));
227
void
rb_check_frozen
(
VALUE
);
228
#define rb_check_frozen_internal(obj) do { \
229
VALUE frozen_obj = (obj); \
230
if (OBJ_FROZEN(frozen_obj)) { \
231
rb_error_frozen(rb_obj_classname(frozen_obj)); \
232
} \
233
} while (0)
234
#ifdef __GNUC__
235
#define rb_check_frozen(obj) __extension__({rb_check_frozen_internal(obj);})
236
#else
237
static
inline
void
238
rb_check_frozen_inline
(
VALUE
obj)
239
{
240
rb_check_frozen_internal
(obj);
241
}
242
#define rb_check_frozen(obj) rb_check_frozen_inline(obj)
243
#endif
244
245
/* eval.c */
246
int
rb_sourceline
(
void
);
247
const
char
*
rb_sourcefile
(
void
);
248
VALUE
rb_check_funcall
(
VALUE
,
ID
,
int
,
VALUE
*);
249
250
#if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
251
typedef
struct
{
252
int
maxfd;
253
fd_set *fdset;
254
}
rb_fdset_t
;
255
256
void
rb_fd_init
(
rb_fdset_t
*);
257
void
rb_fd_term
(
rb_fdset_t
*);
258
void
rb_fd_zero
(
rb_fdset_t
*);
259
void
rb_fd_set
(
int
,
rb_fdset_t
*);
260
void
rb_fd_clr
(
int
,
rb_fdset_t
*);
261
int
rb_fd_isset
(
int
,
const
rb_fdset_t
*);
262
void
rb_fd_copy
(
rb_fdset_t
*,
const
fd_set *,
int
);
263
void
rb_fd_dup
(
rb_fdset_t
*dst,
const
rb_fdset_t
*src);
264
int
rb_fd_select
(
int
,
rb_fdset_t
*,
rb_fdset_t
*,
rb_fdset_t
*,
struct
timeval
*);
265
266
#define rb_fd_ptr(f) ((f)->fdset)
267
#define rb_fd_max(f) ((f)->maxfd)
268
269
#elif defined(_WIN32)
270
271
typedef
struct
{
272
int
capa;
273
fd_set *fdset;
274
}
rb_fdset_t
;
275
276
void
rb_fd_init
(
rb_fdset_t
*);
277
void
rb_fd_term
(
rb_fdset_t
*);
278
#define rb_fd_zero(f) ((f)->fdset->fd_count = 0)
279
void
rb_fd_set
(
int
,
rb_fdset_t
*);
280
#define rb_fd_clr(n, f) rb_w32_fdclr((n), (f)->fdset)
281
#define rb_fd_isset(n, f) rb_w32_fdisset((n), (f)->fdset)
282
#define rb_fd_copy(d, s, n) rb_w32_fd_copy((d), (s), (n))
283
void
rb_w32_fd_copy
(
rb_fdset_t
*,
const
fd_set *,
int
);
284
#define rb_fd_dup(d, s) rb_w32_fd_dup((d), (s))
285
void
rb_w32_fd_dup
(
rb_fdset_t
*dst,
const
rb_fdset_t
*src);
286
#define rb_fd_select(n, rfds, wfds, efds, timeout) rb_w32_select((n), (rfds) ? ((rb_fdset_t*)(rfds))->fdset : NULL, (wfds) ? ((rb_fdset_t*)(wfds))->fdset : NULL, (efds) ? ((rb_fdset_t*)(efds))->fdset: NULL, (timeout))
287
#define rb_fd_resize(n, f) ((void)(f))
288
289
#define rb_fd_ptr(f) ((f)->fdset)
290
#define rb_fd_max(f) ((f)->fdset->fd_count)
291
292
#else
293
294
typedef
fd_set
rb_fdset_t
;
295
#define rb_fd_zero(f) FD_ZERO(f)
296
#define rb_fd_set(n, f) FD_SET((n), (f))
297
#define rb_fd_clr(n, f) FD_CLR((n), (f))
298
#define rb_fd_isset(n, f) FD_ISSET((n), (f))
299
#define rb_fd_copy(d, s, n) (*(d) = *(s))
300
#define rb_fd_dup(d, s) (*(d) = *(s))
301
#define rb_fd_resize(n, f) ((void)(f))
302
#define rb_fd_ptr(f) (f)
303
#define rb_fd_init(f) FD_ZERO(f)
304
#define rb_fd_init_copy(d, s) (*(d) = *(s))
305
#define rb_fd_term(f) ((void)(f))
306
#define rb_fd_max(f) FD_SETSIZE
307
#define rb_fd_select(n, rfds, wfds, efds, timeout) select((n), (rfds), (wfds), (efds), (timeout))
308
309
#endif
310
311
NORETURN
(
void
rb_exc_raise
(
VALUE
));
312
NORETURN
(
void
rb_exc_fatal
(
VALUE
));
313
VALUE
rb_f_exit
(
int
,
VALUE
*);
314
VALUE
rb_f_abort
(
int
,
VALUE
*);
315
void
rb_remove_method
(
VALUE
,
const
char
*);
316
void
rb_remove_method_id
(
VALUE
,
ID
);
317
#define rb_disable_super(klass, name) ((void)0)
318
#define rb_enable_super(klass, name) ((void)0)
319
#define HAVE_RB_DEFINE_ALLOC_FUNC 1
320
typedef
VALUE
(*
rb_alloc_func_t
)(
VALUE
);
321
void
rb_define_alloc_func
(
VALUE
,
rb_alloc_func_t
);
322
void
rb_undef_alloc_func
(
VALUE
);
323
rb_alloc_func_t
rb_get_alloc_func
(
VALUE
);
324
void
rb_clear_cache
(
void
);
325
void
rb_clear_cache_by_class
(
VALUE
);
326
void
rb_alias
(
VALUE
,
ID
,
ID
);
327
void
rb_attr
(
VALUE
,
ID
,
int
,
int
,
int
);
328
int
rb_method_boundp
(
VALUE
,
ID
,
int
);
329
int
rb_method_basic_definition_p
(
VALUE
,
ID
);
330
VALUE
rb_eval_cmd
(
VALUE
,
VALUE
,
int
);
331
int
rb_obj_respond_to
(
VALUE
,
ID
,
int
);
332
int
rb_respond_to
(
VALUE
,
ID
);
333
VALUE
rb_f_notimplement
(
int
argc
,
VALUE
*
argv
,
VALUE
obj);
334
void
rb_interrupt
(
void
);
335
VALUE
rb_apply
(
VALUE
,
ID
,
VALUE
);
336
void
rb_backtrace
(
void
);
337
ID
rb_frame_this_func
(
void
);
338
VALUE
rb_obj_instance_eval
(
int
,
VALUE
*,
VALUE
);
339
VALUE
rb_obj_instance_exec
(
int
,
VALUE
*,
VALUE
);
340
VALUE
rb_mod_module_eval
(
int
,
VALUE
*,
VALUE
);
341
VALUE
rb_mod_module_exec
(
int
,
VALUE
*,
VALUE
);
342
void
rb_load
(
VALUE
,
int
);
343
void
rb_load_protect
(
VALUE
,
int
,
int
*);
344
NORETURN
(
void
rb_jump_tag
(
int
));
345
int
rb_provided
(
const
char
*);
346
int
rb_feature_provided
(
const
char
*,
const
char
**);
347
void
rb_provide
(
const
char
*);
348
VALUE
rb_f_require
(
VALUE
,
VALUE
);
349
VALUE
rb_require_safe
(
VALUE
,
int
);
350
void
rb_obj_call_init
(
VALUE
,
int
,
VALUE
*);
351
VALUE
rb_class_new_instance
(
int
,
VALUE
*,
VALUE
);
352
VALUE
rb_block_proc
(
void
);
353
VALUE
rb_block_lambda
(
void
);
354
VALUE
rb_proc_new
(
VALUE
(*)(
ANYARGS
/* VALUE yieldarg[, VALUE procarg] */
),
VALUE
);
355
VALUE
rb_obj_is_proc
(
VALUE
);
356
VALUE
rb_proc_call
(
VALUE
,
VALUE
);
357
VALUE
rb_proc_call_with_block
(
VALUE
,
int
argc
,
VALUE
*
argv
,
VALUE
);
358
int
rb_proc_arity
(
VALUE
);
359
VALUE
rb_proc_lambda_p
(
VALUE
);
360
VALUE
rb_binding_new
(
void
);
361
VALUE
rb_obj_method
(
VALUE
,
VALUE
);
362
VALUE
rb_obj_is_method
(
VALUE
);
363
VALUE
rb_method_call
(
int
,
VALUE
*,
VALUE
);
364
VALUE
rb_method_call_with_block
(
int
,
VALUE
*,
VALUE
,
VALUE
);
365
int
rb_mod_method_arity
(
VALUE
,
ID
);
366
int
rb_obj_method_arity
(
VALUE
,
ID
);
367
VALUE
rb_protect
(
VALUE
(*)(
VALUE
),
VALUE
,
int
*);
368
void
rb_set_end_proc
(
void
(*)(
VALUE
),
VALUE
);
369
void
rb_mark_end_proc
(
void
);
370
void
rb_exec_end_proc
(
void
);
371
void
ruby_finalize
(
void
);
372
NORETURN
(
void
ruby_stop
(
int
));
373
int
ruby_cleanup
(
volatile
int
);
374
DEPRECATED
(
void
rb_gc_mark_threads
(
void
));
375
void
rb_thread_schedule
(
void
);
376
void
rb_thread_wait_fd
(
int
);
377
int
rb_thread_fd_writable
(
int
);
378
void
rb_thread_fd_close
(
int
);
379
int
rb_thread_alone
(
void
);
380
void
rb_thread_polling
(
void
);
381
void
rb_thread_sleep
(
int
);
382
void
rb_thread_sleep_forever
(
void
);
383
VALUE
rb_thread_stop
(
void
);
384
VALUE
rb_thread_wakeup
(
VALUE
);
385
VALUE
rb_thread_wakeup_alive
(
VALUE
);
386
VALUE
rb_thread_run
(
VALUE
);
387
VALUE
rb_thread_kill
(
VALUE
);
388
VALUE
rb_thread_create
(
VALUE
(*)(
ANYARGS
),
void
*);
389
DEPRECATED
(
int
rb_thread_select
(
int
, fd_set *, fd_set *, fd_set *,
struct
timeval
*));
390
int
rb_thread_fd_select
(
int
, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *,
struct
timeval
*);
391
void
rb_thread_wait_for
(
struct
timeval
);
392
VALUE
rb_thread_current
(
void
);
393
VALUE
rb_thread_main
(
void
);
394
VALUE
rb_thread_local_aref
(
VALUE
,
ID
);
395
VALUE
rb_thread_local_aset
(
VALUE
,
ID
,
VALUE
);
396
void
rb_thread_atfork
(
void
);
397
void
rb_thread_atfork_before_exec
(
void
);
398
VALUE
rb_exec_recursive
(
VALUE
(*)(
VALUE
,
VALUE
,
int
),
VALUE
,
VALUE
);
399
VALUE
rb_exec_recursive_paired
(
VALUE
(*)(
VALUE
,
VALUE
,
int
),
VALUE
,
VALUE
,
VALUE
);
400
VALUE
rb_exec_recursive_outer
(
VALUE
(*)(
VALUE
,
VALUE
,
int
),
VALUE
,
VALUE
);
401
/* dir.c */
402
VALUE
rb_dir_getwd
(
void
);
403
/* file.c */
404
VALUE
rb_file_s_expand_path
(
int
,
VALUE
*);
405
VALUE
rb_file_expand_path
(
VALUE
,
VALUE
);
406
VALUE
rb_file_s_absolute_path
(
int
,
VALUE
*);
407
VALUE
rb_file_absolute_path
(
VALUE
,
VALUE
);
408
VALUE
rb_file_dirname
(
VALUE
fname);
409
void
rb_file_const
(
const
char
*,
VALUE
);
410
int
rb_file_load_ok
(
const
char
*);
411
int
rb_find_file_ext_safe
(
VALUE
*,
const
char
*
const
*,
int
);
412
VALUE
rb_find_file_safe
(
VALUE
,
int
);
413
int
rb_find_file_ext
(
VALUE
*,
const
char
*
const
*);
414
VALUE
rb_find_file
(
VALUE
);
415
VALUE
rb_file_directory_p
(
VALUE
,
VALUE
);
416
VALUE
rb_str_encode_ospath
(
VALUE
);
417
int
rb_is_absolute_path
(
const
char
*);
418
/* gc.c */
419
void
ruby_set_stack_size
(
size_t
);
420
NORETURN
(
void
rb_memerror
(
void
));
421
int
ruby_stack_check
(
void
);
422
size_t
ruby_stack_length
(
VALUE
**);
423
int
rb_during_gc
(
void
);
424
void
rb_gc_mark_locations
(
VALUE
*,
VALUE
*);
425
void
rb_mark_tbl
(
struct
st_table
*);
426
void
rb_mark_set
(
struct
st_table
*);
427
void
rb_mark_hash
(
struct
st_table
*);
428
void
rb_gc_mark_maybe
(
VALUE
);
429
void
rb_gc_mark
(
VALUE
);
430
void
rb_gc_force_recycle
(
VALUE
);
431
void
rb_gc
(
void
);
432
void
rb_gc_copy_finalizer
(
VALUE
,
VALUE
);
433
void
rb_gc_finalize_deferred
(
void
);
434
void
rb_gc_call_finalizer_at_exit
(
void
);
435
VALUE
rb_gc_enable
(
void
);
436
VALUE
rb_gc_disable
(
void
);
437
VALUE
rb_gc_start
(
void
);
438
#define Init_stack(addr) ruby_init_stack(addr)
439
void
rb_gc_set_params
(
void
);
440
/* hash.c */
441
void
st_foreach_safe
(
struct
st_table
*,
int
(*)(
ANYARGS
),
st_data_t
);
442
VALUE
rb_check_hash_type
(
VALUE
);
443
void
rb_hash_foreach
(
VALUE
,
int
(*)(
ANYARGS
),
VALUE
);
444
VALUE
rb_hash
(
VALUE
);
445
VALUE
rb_hash_new
(
void
);
446
VALUE
rb_hash_dup
(
VALUE
);
447
VALUE
rb_hash_freeze
(
VALUE
);
448
VALUE
rb_hash_aref
(
VALUE
,
VALUE
);
449
VALUE
rb_hash_lookup
(
VALUE
,
VALUE
);
450
VALUE
rb_hash_lookup2
(
VALUE
,
VALUE
,
VALUE
);
451
VALUE
rb_hash_fetch
(
VALUE
,
VALUE
);
452
VALUE
rb_hash_aset
(
VALUE
,
VALUE
,
VALUE
);
453
VALUE
rb_hash_delete_if
(
VALUE
);
454
VALUE
rb_hash_delete
(
VALUE
,
VALUE
);
455
typedef
VALUE
rb_hash_update_func
(
VALUE
newkey,
VALUE
oldkey,
VALUE
value);
456
VALUE
rb_hash_update_by
(
VALUE
hash1,
VALUE
hash2,
rb_hash_update_func
*
func
);
457
struct
st_table
*
rb_hash_tbl
(
VALUE
);
458
int
rb_path_check
(
const
char
*);
459
int
rb_env_path_tainted
(
void
);
460
VALUE
rb_env_clear
(
void
);
461
/* io.c */
462
#define rb_defout rb_stdout
463
RUBY_EXTERN
VALUE
rb_fs
;
464
RUBY_EXTERN
VALUE
rb_output_fs
;
465
RUBY_EXTERN
VALUE
rb_rs
;
466
RUBY_EXTERN
VALUE
rb_default_rs
;
467
RUBY_EXTERN
VALUE
rb_output_rs
;
468
VALUE
rb_io_write
(
VALUE
,
VALUE
);
469
VALUE
rb_io_gets
(
VALUE
);
470
VALUE
rb_io_getbyte
(
VALUE
);
471
VALUE
rb_io_ungetc
(
VALUE
,
VALUE
);
472
VALUE
rb_io_ungetbyte
(
VALUE
,
VALUE
);
473
VALUE
rb_io_close
(
VALUE
);
474
VALUE
rb_io_flush
(
VALUE
);
475
VALUE
rb_io_eof
(
VALUE
);
476
VALUE
rb_io_binmode
(
VALUE
);
477
VALUE
rb_io_ascii8bit_binmode
(
VALUE
);
478
VALUE
rb_io_addstr
(
VALUE
,
VALUE
);
479
VALUE
rb_io_printf
(
int
,
VALUE
*,
VALUE
);
480
VALUE
rb_io_print
(
int
,
VALUE
*,
VALUE
);
481
VALUE
rb_io_puts
(
int
,
VALUE
*,
VALUE
);
482
VALUE
rb_io_fdopen
(
int
,
int
,
const
char
*);
483
VALUE
rb_io_get_io
(
VALUE
);
484
VALUE
rb_file_open
(
const
char
*,
const
char
*);
485
VALUE
rb_file_open_str
(
VALUE
,
const
char
*);
486
VALUE
rb_gets
(
void
);
487
void
rb_write_error
(
const
char
*);
488
void
rb_write_error2
(
const
char
*,
long
);
489
void
rb_close_before_exec
(
int
lowfd,
int
maxhint,
VALUE
noclose_fds);
490
int
rb_pipe
(
int
*pipes);
491
int
rb_reserved_fd_p
(
int
fd);
492
#define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
493
void
rb_update_max_fd
(
int
fd);
494
/* marshal.c */
495
VALUE
rb_marshal_dump
(
VALUE
,
VALUE
);
496
VALUE
rb_marshal_load
(
VALUE
);
497
void
rb_marshal_define_compat
(
VALUE
newclass,
VALUE
oldclass,
VALUE
(*dumper)(
VALUE
),
VALUE
(*loader)(
VALUE
,
VALUE
));
498
/* numeric.c */
499
NORETURN
(
void
rb_num_zerodiv
(
void
));
500
#define RB_NUM_COERCE_FUNCS_NEED_OPID 1
501
VALUE
rb_num_coerce_bin
(
VALUE
,
VALUE
,
ID
);
502
VALUE
rb_num_coerce_cmp
(
VALUE
,
VALUE
,
ID
);
503
VALUE
rb_num_coerce_relop
(
VALUE
,
VALUE
,
ID
);
504
VALUE
rb_float_new
(
double
);
505
VALUE
rb_num2fix
(
VALUE
);
506
VALUE
rb_fix2str
(
VALUE
,
int
);
507
VALUE
rb_dbl_cmp
(
double
,
double
);
508
/* object.c */
509
int
rb_eql
(
VALUE
,
VALUE
);
510
VALUE
rb_any_to_s
(
VALUE
);
511
VALUE
rb_inspect
(
VALUE
);
512
VALUE
rb_obj_is_instance_of
(
VALUE
,
VALUE
);
513
VALUE
rb_obj_is_kind_of
(
VALUE
,
VALUE
);
514
VALUE
rb_obj_alloc
(
VALUE
);
515
VALUE
rb_obj_clone
(
VALUE
);
516
VALUE
rb_obj_dup
(
VALUE
);
517
VALUE
rb_obj_init_copy
(
VALUE
,
VALUE
);
518
VALUE
rb_obj_taint
(
VALUE
);
519
VALUE
rb_obj_tainted
(
VALUE
);
520
VALUE
rb_obj_untaint
(
VALUE
);
521
VALUE
rb_obj_untrust
(
VALUE
);
522
VALUE
rb_obj_untrusted
(
VALUE
);
523
VALUE
rb_obj_trust
(
VALUE
);
524
VALUE
rb_obj_freeze
(
VALUE
);
525
VALUE
rb_obj_frozen_p
(
VALUE
);
526
VALUE
rb_obj_id
(
VALUE
);
527
VALUE
rb_obj_class
(
VALUE
);
528
VALUE
rb_class_real
(
VALUE
);
529
VALUE
rb_class_inherited_p
(
VALUE
,
VALUE
);
530
VALUE
rb_class_superclass
(
VALUE
);
531
VALUE
rb_class_get_superclass
(
VALUE
);
532
VALUE
rb_convert_type
(
VALUE
,
int
,
const
char
*,
const
char
*);
533
VALUE
rb_check_convert_type
(
VALUE
,
int
,
const
char
*,
const
char
*);
534
VALUE
rb_check_to_integer
(
VALUE
,
const
char
*);
535
VALUE
rb_check_to_float
(
VALUE
);
536
VALUE
rb_to_int
(
VALUE
);
537
VALUE
rb_Integer
(
VALUE
);
538
VALUE
rb_to_float
(
VALUE
);
539
VALUE
rb_Float
(
VALUE
);
540
VALUE
rb_String
(
VALUE
);
541
VALUE
rb_Array
(
VALUE
);
542
double
rb_cstr_to_dbl
(
const
char
*,
int
);
543
double
rb_str_to_dbl
(
VALUE
,
int
);
544
/* parse.y */
545
RUBY_EXTERN
int
ruby_sourceline
;
546
RUBY_EXTERN
char
*
ruby_sourcefile
;
547
ID
rb_id_attrset
(
ID
);
548
void
rb_gc_mark_parser
(
void
);
549
int
rb_is_const_id
(
ID
);
550
int
rb_is_instance_id
(
ID
);
551
int
rb_is_class_id
(
ID
);
552
int
rb_is_local_id
(
ID
);
553
int
rb_is_junk_id
(
ID
);
554
int
rb_symname_p
(
const
char
*);
555
int
rb_sym_interned_p
(
VALUE
);
556
void
rb_gc_mark_symbols
(
void
);
557
VALUE
rb_backref_get
(
void
);
558
void
rb_backref_set
(
VALUE
);
559
VALUE
rb_lastline_get
(
void
);
560
void
rb_lastline_set
(
VALUE
);
561
VALUE
rb_sym_all_symbols
(
void
);
562
/* process.c */
563
void
rb_last_status_set
(
int
status, rb_pid_t pid);
564
VALUE
rb_last_status_get
(
void
);
565
struct
rb_exec_arg
{
566
int
argc
;
567
VALUE
*
argv
;
568
const
char
*
prog
;
569
VALUE
options
;
570
VALUE
redirect_fds
;
571
};
572
int
rb_proc_exec_n
(
int
,
VALUE
*,
const
char
*);
573
int
rb_proc_exec
(
const
char
*);
574
VALUE
rb_exec_arg_init
(
int
argc
,
VALUE
*
argv
,
int
accept_shell,
struct
rb_exec_arg
*e);
575
int
rb_exec_arg_addopt
(
struct
rb_exec_arg
*e,
VALUE
key
,
VALUE
val);
576
void
rb_exec_arg_fixup
(
struct
rb_exec_arg
*e);
577
int
rb_run_exec_options
(
const
struct
rb_exec_arg
*e,
struct
rb_exec_arg
*s);
578
int
rb_run_exec_options_err
(
const
struct
rb_exec_arg
*e,
struct
rb_exec_arg
*s,
char
*,
size_t
);
579
int
rb_exec
(
const
struct
rb_exec_arg
*);
580
int
rb_exec_err
(
const
struct
rb_exec_arg
*,
char
*,
size_t
);
581
rb_pid_t
rb_fork
(
int
*,
int
(*)(
void
*),
void
*,
VALUE
);
582
rb_pid_t
rb_fork_err
(
int
*,
int
(*)(
void
*,
char
*,
size_t
),
void
*,
VALUE
,
char
*,
size_t
);
583
VALUE
rb_f_exec
(
int
,
VALUE
*);
584
rb_pid_t
rb_waitpid
(rb_pid_t pid,
int
*status,
int
flags);
585
void
rb_syswait
(rb_pid_t pid);
586
rb_pid_t
rb_spawn
(
int
,
VALUE
*);
587
rb_pid_t
rb_spawn_err
(
int
,
VALUE
*,
char
*,
size_t
);
588
VALUE
rb_proc_times
(
VALUE
);
589
VALUE
rb_detach_process
(rb_pid_t pid);
590
/* range.c */
591
VALUE
rb_range_new
(
VALUE
,
VALUE
,
int
);
592
VALUE
rb_range_beg_len
(
VALUE
,
long
*,
long
*,
long
,
int
);
593
int
rb_range_values
(
VALUE
range
,
VALUE
*begp,
VALUE
*endp,
int
*exclp);
594
/* random.c */
595
unsigned
int
rb_genrand_int32
(
void
);
596
double
rb_genrand_real
(
void
);
597
void
rb_reset_random_seed
(
void
);
598
VALUE
rb_random_bytes
(
VALUE
rnd,
long
n);
599
VALUE
rb_random_int
(
VALUE
rnd,
VALUE
max
);
600
unsigned
int
rb_random_int32
(
VALUE
rnd);
601
double
rb_random_real
(
VALUE
rnd);
602
unsigned
long
rb_genrand_ulong_limited
(
unsigned
long
i
);
603
/* re.c */
604
#define rb_memcmp memcmp
605
int
rb_memcicmp
(
const
void
*,
const
void
*,
long
);
606
void
rb_match_busy
(
VALUE
);
607
VALUE
rb_reg_nth_defined
(
int
,
VALUE
);
608
VALUE
rb_reg_nth_match
(
int
,
VALUE
);
609
int
rb_reg_backref_number
(
VALUE
match
,
VALUE
backref);
610
VALUE
rb_reg_last_match
(
VALUE
);
611
VALUE
rb_reg_match_pre
(
VALUE
);
612
VALUE
rb_reg_match_post
(
VALUE
);
613
VALUE
rb_reg_match_last
(
VALUE
);
614
#define HAVE_RB_REG_NEW_STR 1
615
VALUE
rb_reg_new_str
(
VALUE
,
int
);
616
VALUE
rb_reg_new
(
const
char
*,
long
,
int
);
617
VALUE
rb_reg_alloc
(
void
);
618
VALUE
rb_reg_init_str
(
VALUE
re,
VALUE
s,
int
options
);
619
VALUE
rb_reg_match
(
VALUE
,
VALUE
);
620
VALUE
rb_reg_match2
(
VALUE
);
621
int
rb_reg_options
(
VALUE
);
622
/* ruby.c */
623
#define rb_argv rb_get_argv()
624
RUBY_EXTERN
VALUE
rb_argv0
;
625
VALUE
rb_get_argv
(
void
);
626
void
*
rb_load_file
(
const
char
*);
627
void
ruby_script
(
const
char
*);
628
void
ruby_prog_init
(
void
);
629
void
ruby_set_argv
(
int
,
char
**);
630
void
*
ruby_process_options
(
int
,
char
**);
631
void
ruby_init_loadpath
(
void
);
632
void
ruby_incpush
(
const
char
*);
633
/* signal.c */
634
VALUE
rb_f_kill
(
int
,
VALUE
*);
635
void
rb_gc_mark_trap_list
(
void
);
636
#ifdef POSIX_SIGNAL
637
#define posix_signal ruby_posix_signal
638
RETSIGTYPE (*
posix_signal
(
int
, RETSIGTYPE (*)(
int
)))(int);
639
#endif
640
void
ruby_sig_finalize
(
void
);
641
void
rb_trap_exit
(
void
);
642
void
rb_trap_exec
(
void
);
643
const
char
*
ruby_signal_name
(
int
);
644
void
ruby_default_signal
(
int
);
645
/* sprintf.c */
646
VALUE
rb_f_sprintf
(
int
,
const
VALUE
*);
647
PRINTF_ARGS
(
VALUE
rb_sprintf
(
const
char
*, ...), 1, 2);
648
VALUE
rb_vsprintf
(
const
char
*, va_list);
649
PRINTF_ARGS
(
VALUE
rb_str_catf
(
VALUE
,
const
char
*, ...), 2, 3);
650
VALUE
rb_str_vcatf
(
VALUE
,
const
char
*, va_list);
651
VALUE
rb_str_format
(
int
,
const
VALUE
*,
VALUE
);
652
/* string.c */
653
VALUE
rb_str_new
(
const
char
*,
long
);
654
VALUE
rb_str_new_cstr
(
const
char
*);
655
VALUE
rb_str_new2
(
const
char
*);
656
VALUE
rb_str_new_shared
(
VALUE
);
657
VALUE
rb_str_new3
(
VALUE
);
658
VALUE
rb_str_new_frozen
(
VALUE
);
659
VALUE
rb_str_new4
(
VALUE
);
660
VALUE
rb_str_new_with_class
(
VALUE
,
const
char
*,
long
);
661
VALUE
rb_str_new5
(
VALUE
,
const
char
*,
long
);
662
VALUE
rb_tainted_str_new_cstr
(
const
char
*);
663
VALUE
rb_tainted_str_new
(
const
char
*,
long
);
664
VALUE
rb_tainted_str_new2
(
const
char
*);
665
VALUE
rb_external_str_new
(
const
char
*,
long
);
666
VALUE
rb_external_str_new_cstr
(
const
char
*);
667
VALUE
rb_locale_str_new
(
const
char
*,
long
);
668
VALUE
rb_locale_str_new_cstr
(
const
char
*);
669
VALUE
rb_filesystem_str_new
(
const
char
*,
long
);
670
VALUE
rb_filesystem_str_new_cstr
(
const
char
*);
671
VALUE
rb_str_buf_new
(
long
);
672
VALUE
rb_str_buf_new_cstr
(
const
char
*);
673
VALUE
rb_str_buf_new2
(
const
char
*);
674
VALUE
rb_str_tmp_new
(
long
);
675
VALUE
rb_usascii_str_new
(
const
char
*,
long
);
676
VALUE
rb_usascii_str_new_cstr
(
const
char
*);
677
VALUE
rb_usascii_str_new2
(
const
char
*);
678
void
rb_str_free
(
VALUE
);
679
void
rb_str_shared_replace
(
VALUE
,
VALUE
);
680
VALUE
rb_str_buf_append
(
VALUE
,
VALUE
);
681
VALUE
rb_str_buf_cat
(
VALUE
,
const
char
*,
long
);
682
VALUE
rb_str_buf_cat2
(
VALUE
,
const
char
*);
683
VALUE
rb_str_buf_cat_ascii
(
VALUE
,
const
char
*);
684
VALUE
rb_obj_as_string
(
VALUE
);
685
VALUE
rb_check_string_type
(
VALUE
);
686
VALUE
rb_str_dup
(
VALUE
);
687
VALUE
rb_str_resurrect
(
VALUE
str);
688
VALUE
rb_str_locktmp
(
VALUE
);
689
VALUE
rb_str_unlocktmp
(
VALUE
);
690
VALUE
rb_str_dup_frozen
(
VALUE
);
691
#define rb_str_dup_frozen rb_str_new_frozen
692
VALUE
rb_str_plus
(
VALUE
,
VALUE
);
693
VALUE
rb_str_times
(
VALUE
,
VALUE
);
694
long
rb_str_sublen
(
VALUE
,
long
);
695
VALUE
rb_str_substr
(
VALUE
,
long
,
long
);
696
VALUE
rb_str_subseq
(
VALUE
,
long
,
long
);
697
void
rb_str_modify
(
VALUE
);
698
void
rb_str_modify_expand
(
VALUE
,
long
);
699
VALUE
rb_str_freeze
(
VALUE
);
700
void
rb_str_set_len
(
VALUE
,
long
);
701
VALUE
rb_str_resize
(
VALUE
,
long
);
702
VALUE
rb_str_cat
(
VALUE
,
const
char
*,
long
);
703
VALUE
rb_str_cat2
(
VALUE
,
const
char
*);
704
VALUE
rb_str_append
(
VALUE
,
VALUE
);
705
VALUE
rb_str_concat
(
VALUE
,
VALUE
);
706
st_index_t
rb_memhash
(
const
void
*ptr,
long
len
);
707
st_index_t
rb_hash_start
(
st_index_t
);
708
st_index_t
rb_hash_uint32
(
st_index_t
,
uint32_t
);
709
st_index_t
rb_hash_uint
(
st_index_t
,
st_index_t
);
710
st_index_t
rb_hash_end
(
st_index_t
);
711
#define rb_hash_uint32(h, i) st_hash_uint32((h), (i))
712
#define rb_hash_uint(h, i) st_hash_uint((h), (i))
713
#define rb_hash_end(h) st_hash_end(h)
714
st_index_t
rb_str_hash
(
VALUE
);
715
int
rb_str_hash_cmp
(
VALUE
,
VALUE
);
716
int
rb_str_comparable
(
VALUE
,
VALUE
);
717
int
rb_str_cmp
(
VALUE
,
VALUE
);
718
VALUE
rb_str_equal
(
VALUE
str1,
VALUE
str2);
719
VALUE
rb_str_drop_bytes
(
VALUE
,
long
);
720
void
rb_str_update
(
VALUE
,
long
,
long
,
VALUE
);
721
VALUE
rb_str_replace
(
VALUE
,
VALUE
);
722
VALUE
rb_str_inspect
(
VALUE
);
723
VALUE
rb_str_dump
(
VALUE
);
724
VALUE
rb_str_split
(
VALUE
,
const
char
*);
725
void
rb_str_associate
(
VALUE
,
VALUE
);
726
VALUE
rb_str_associated
(
VALUE
);
727
void
rb_str_setter
(
VALUE
,
ID
,
VALUE
*);
728
VALUE
rb_str_intern
(
VALUE
);
729
VALUE
rb_sym_to_s
(
VALUE
);
730
long
rb_str_strlen
(
VALUE
);
731
VALUE
rb_str_length
(
VALUE
);
732
long
rb_str_offset
(
VALUE
,
long
);
733
size_t
rb_str_capacity
(
VALUE
);
734
VALUE
rb_str_ellipsize
(
VALUE
,
long
);
735
#if defined(__GNUC__) && !defined(__PCC__)
736
#define rb_str_new_cstr(str) __extension__ ( \
737
{ \
738
(__builtin_constant_p(str)) ? \
739
rb_str_new((str), (long)strlen(str)) : \
740
rb_str_new_cstr(str); \
741
})
742
#define rb_tainted_str_new_cstr(str) __extension__ ( \
743
{ \
744
(__builtin_constant_p(str)) ? \
745
rb_tainted_str_new((str), (long)strlen(str)) : \
746
rb_tainted_str_new_cstr(str); \
747
})
748
#define rb_usascii_str_new_cstr(str) __extension__ ( \
749
{ \
750
(__builtin_constant_p(str)) ? \
751
rb_usascii_str_new((str), (long)strlen(str)) : \
752
rb_usascii_str_new_cstr(str); \
753
})
754
#define rb_external_str_new_cstr(str) __extension__ ( \
755
{ \
756
(__builtin_constant_p(str)) ? \
757
rb_external_str_new((str), (long)strlen(str)) : \
758
rb_external_str_new_cstr(str); \
759
})
760
#define rb_locale_str_new_cstr(str) __extension__ ( \
761
{ \
762
(__builtin_constant_p(str)) ? \
763
rb_locale_str_new((str), (long)strlen(str)) : \
764
rb_locale_str_new_cstr(str); \
765
})
766
#define rb_str_buf_new_cstr(str) __extension__ ( \
767
{ \
768
(__builtin_constant_p(str)) ? \
769
rb_str_buf_cat(rb_str_buf_new((long)strlen(str)), \
770
(str), (long)strlen(str)) : \
771
rb_str_buf_new_cstr(str); \
772
})
773
#define rb_str_buf_cat2(str, ptr) __extension__ ( \
774
{ \
775
(__builtin_constant_p(ptr)) ? \
776
rb_str_buf_cat((str), (ptr), (long)strlen(ptr)) : \
777
rb_str_buf_cat2((str), (ptr)); \
778
})
779
#define rb_str_cat2(str, ptr) __extension__ ( \
780
{ \
781
(__builtin_constant_p(ptr)) ? \
782
rb_str_cat((str), (ptr), (long)strlen(ptr)) : \
783
rb_str_cat2((str), (ptr)); \
784
})
785
#define rb_exc_new2(klass, ptr) __extension__ ( \
786
{ \
787
(__builtin_constant_p(ptr)) ? \
788
rb_exc_new((klass), (ptr), (long)strlen(ptr)) : \
789
rb_exc_new2((klass), (ptr)); \
790
})
791
#endif
792
#define rb_str_new2 rb_str_new_cstr
793
#define rb_str_new3 rb_str_new_shared
794
#define rb_str_new4 rb_str_new_frozen
795
#define rb_str_new5 rb_str_new_with_class
796
#define rb_tainted_str_new2 rb_tainted_str_new_cstr
797
#define rb_str_buf_new2 rb_str_buf_new_cstr
798
#define rb_usascii_str_new2 rb_usascii_str_new_cstr
799
/* struct.c */
800
VALUE
rb_struct_new
(
VALUE
, ...);
801
VALUE
rb_struct_define
(
const
char
*, ...);
802
VALUE
rb_struct_alloc
(
VALUE
,
VALUE
);
803
VALUE
rb_struct_initialize
(
VALUE
,
VALUE
);
804
VALUE
rb_struct_aref
(
VALUE
,
VALUE
);
805
VALUE
rb_struct_aset
(
VALUE
,
VALUE
,
VALUE
);
806
VALUE
rb_struct_getmember
(
VALUE
,
ID
);
807
DEPRECATED
(
VALUE
rb_struct_iv_get
(
VALUE
,
const
char
*));
808
VALUE
rb_struct_s_members
(
VALUE
);
809
VALUE
rb_struct_members
(
VALUE
);
810
VALUE
rb_struct_alloc_noinit
(
VALUE
);
811
VALUE
rb_struct_define_without_accessor
(
const
char
*,
VALUE
,
rb_alloc_func_t
, ...);
812
/* thread.c */
813
typedef
void
rb_unblock_function_t
(
void
*);
814
typedef
VALUE
rb_blocking_function_t
(
void
*);
815
void
rb_thread_check_ints
(
void
);
816
int
rb_thread_interrupted
(
VALUE
thval);
817
VALUE
rb_thread_blocking_region
(
rb_blocking_function_t
*
func
,
void
*data1,
818
rb_unblock_function_t
*ubf,
void
*data2);
819
#define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
820
#define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
821
VALUE
rb_mutex_new
(
void
);
822
VALUE
rb_mutex_locked_p
(
VALUE
mutex);
823
VALUE
rb_mutex_trylock
(
VALUE
mutex);
824
VALUE
rb_mutex_lock
(
VALUE
mutex);
825
VALUE
rb_mutex_unlock
(
VALUE
mutex);
826
VALUE
rb_mutex_sleep
(
VALUE
self
,
VALUE
timeout);
827
VALUE
rb_mutex_synchronize
(
VALUE
mutex,
VALUE
(*
func
)(
VALUE
arg
),
VALUE
arg);
828
VALUE
rb_barrier_new
(
void
);
829
VALUE
rb_barrier_wait
(
VALUE
self
);
830
VALUE
rb_barrier_release
(
VALUE
self
);
831
VALUE
rb_barrier_destroy
(
VALUE
self
);
832
/* time.c */
833
VALUE
rb_time_new
(time_t,
long
);
834
VALUE
rb_time_nano_new
(time_t,
long
);
835
VALUE
rb_time_num_new
(
VALUE
,
VALUE
);
836
struct
timeval
rb_time_interval
(
VALUE
num);
837
struct
timeval
rb_time_timeval
(
VALUE
time);
838
struct
timespec
rb_time_timespec
(
VALUE
time);
839
/* variable.c */
840
VALUE
rb_mod_name
(
VALUE
);
841
VALUE
rb_class_path
(
VALUE
);
842
void
rb_set_class_path
(
VALUE
,
VALUE
,
const
char
*);
843
void
rb_set_class_path_string
(
VALUE
,
VALUE
,
VALUE
);
844
VALUE
rb_path_to_class
(
VALUE
);
845
VALUE
rb_path2class
(
const
char
*);
846
void
rb_name_class
(
VALUE
,
ID
);
847
VALUE
rb_class_name
(
VALUE
);
848
void
rb_autoload
(
VALUE
,
ID
,
const
char
*);
849
VALUE
rb_autoload_load
(
VALUE
,
ID
);
850
VALUE
rb_autoload_p
(
VALUE
,
ID
);
851
void
rb_gc_mark_global_tbl
(
void
);
852
VALUE
rb_f_trace_var
(
int
,
VALUE
*);
853
VALUE
rb_f_untrace_var
(
int
,
VALUE
*);
854
VALUE
rb_f_global_variables
(
void
);
855
void
rb_alias_variable
(
ID
,
ID
);
856
struct
st_table
*
rb_generic_ivar_table
(
VALUE
);
857
void
rb_copy_generic_ivar
(
VALUE
,
VALUE
);
858
void
rb_mark_generic_ivar
(
VALUE
);
859
void
rb_mark_generic_ivar_tbl
(
void
);
860
void
rb_free_generic_ivar
(
VALUE
);
861
VALUE
rb_ivar_get
(
VALUE
,
ID
);
862
VALUE
rb_ivar_set
(
VALUE
,
ID
,
VALUE
);
863
VALUE
rb_ivar_defined
(
VALUE
,
ID
);
864
void
rb_ivar_foreach
(
VALUE
,
int
(*)(
ANYARGS
),
st_data_t
);
865
st_index_t
rb_ivar_count
(
VALUE
);
866
VALUE
rb_iv_set
(
VALUE
,
const
char
*,
VALUE
);
867
VALUE
rb_iv_get
(
VALUE
,
const
char
*);
868
VALUE
rb_attr_get
(
VALUE
,
ID
);
869
VALUE
rb_obj_instance_variables
(
VALUE
);
870
VALUE
rb_obj_remove_instance_variable
(
VALUE
,
VALUE
);
871
void
*
rb_mod_const_at
(
VALUE
,
void
*);
872
void
*
rb_mod_const_of
(
VALUE
,
void
*);
873
VALUE
rb_const_list
(
void
*);
874
VALUE
rb_mod_constants
(
int
,
VALUE
*,
VALUE
);
875
VALUE
rb_mod_remove_const
(
VALUE
,
VALUE
);
876
int
rb_const_defined
(
VALUE
,
ID
);
877
int
rb_const_defined_at
(
VALUE
,
ID
);
878
int
rb_const_defined_from
(
VALUE
,
ID
);
879
VALUE
rb_const_get
(
VALUE
,
ID
);
880
VALUE
rb_const_get_at
(
VALUE
,
ID
);
881
VALUE
rb_const_get_from
(
VALUE
,
ID
);
882
void
rb_const_set
(
VALUE
,
ID
,
VALUE
);
883
VALUE
rb_const_remove
(
VALUE
,
ID
);
884
VALUE
rb_mod_const_missing
(
VALUE
,
VALUE
);
885
VALUE
rb_cvar_defined
(
VALUE
,
ID
);
886
void
rb_cvar_set
(
VALUE
,
ID
,
VALUE
);
887
VALUE
rb_cvar_get
(
VALUE
,
ID
);
888
void
rb_cv_set
(
VALUE
,
const
char
*,
VALUE
);
889
VALUE
rb_cv_get
(
VALUE
,
const
char
*);
890
void
rb_define_class_variable
(
VALUE
,
const
char
*,
VALUE
);
891
VALUE
rb_mod_class_variables
(
VALUE
);
892
VALUE
rb_mod_remove_cvar
(
VALUE
,
VALUE
);
893
/* version.c */
894
void
ruby_show_version
(
void
);
895
void
ruby_show_copyright
(
void
);
896
897
ID
rb_frame_callee
(
void
);
898
VALUE
rb_str_succ
(
VALUE
);
899
VALUE
rb_time_succ
(
VALUE
);
900
void
rb_frame_pop
(
void
);
901
int
rb_frame_method_id_and_class
(
ID
*idp,
VALUE
*klassp);
902
VALUE
rb_make_backtrace
(
void
);
903
VALUE
rb_make_exception
(
int
,
VALUE
*);
904
905
#if defined __GNUC__ && __GNUC__ >= 4
906
#pragma GCC visibility pop
907
#endif
908
909
#if defined(__cplusplus)
910
#if 0
911
{
/* satisfy cc-mode */
912
#endif
913
}
/* extern "C" { */
914
#endif
915
916
#endif
/* RUBY_INTERN_H */
917
Generated on Fri Jun 28 2013 02:34:40 for Ruby by
1.8.3