Ruby 2.0.0p247(2013-06-27revision41674)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

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