00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef RUBY_INTERN_H
00015 #define RUBY_INTERN_H 1
00016
00017 #if defined(__cplusplus)
00018 extern "C" {
00019 #if 0
00020 }
00021 #endif
00022 #endif
00023
00024 #include "ruby/defines.h"
00025 #ifdef RUBY_EXTCONF_H
00026 #include RUBY_EXTCONF_H
00027 #endif
00028
00029 #ifdef HAVE_STDARG_PROTOTYPES
00030 # include <stdarg.h>
00031 #else
00032 # include <varargs.h>
00033 #endif
00034
00035 #include "ruby/st.h"
00036
00037 RUBY_SYMBOL_EXPORT_BEGIN
00038
00039
00040
00041
00042
00043
00044 #define UNLIMITED_ARGUMENTS (-1)
00045
00046
00047 void rb_mem_clear(register VALUE*, register long);
00048 VALUE rb_assoc_new(VALUE, VALUE);
00049 VALUE rb_check_array_type(VALUE);
00050 VALUE rb_ary_new(void);
00051 VALUE rb_ary_new_capa(long capa);
00052 VALUE rb_ary_new_from_args(long n, ...);
00053 VALUE rb_ary_new_from_values(long n, const VALUE *elts);
00054 VALUE rb_ary_tmp_new(long);
00055 void rb_ary_free(VALUE);
00056 void rb_ary_modify(VALUE);
00057 VALUE rb_ary_freeze(VALUE);
00058 VALUE rb_ary_shared_with_p(VALUE, VALUE);
00059 VALUE rb_ary_aref(int, VALUE*, VALUE);
00060 VALUE rb_ary_subseq(VALUE, long, long);
00061 void rb_ary_store(VALUE, long, VALUE);
00062 VALUE rb_ary_dup(VALUE);
00063 VALUE rb_ary_resurrect(VALUE ary);
00064 VALUE rb_ary_to_ary(VALUE);
00065 VALUE rb_ary_to_s(VALUE);
00066 VALUE rb_ary_cat(VALUE, const VALUE *, long);
00067 VALUE rb_ary_push(VALUE, VALUE);
00068 VALUE rb_ary_pop(VALUE);
00069 VALUE rb_ary_shift(VALUE);
00070 VALUE rb_ary_unshift(VALUE, VALUE);
00071 VALUE rb_ary_entry(VALUE, long);
00072 VALUE rb_ary_each(VALUE);
00073 VALUE rb_ary_join(VALUE, VALUE);
00074 VALUE rb_ary_reverse(VALUE);
00075 VALUE rb_ary_rotate(VALUE, long);
00076 VALUE rb_ary_sort(VALUE);
00077 VALUE rb_ary_sort_bang(VALUE);
00078 VALUE rb_ary_delete(VALUE, VALUE);
00079 VALUE rb_ary_delete_at(VALUE, long);
00080 VALUE rb_ary_clear(VALUE);
00081 VALUE rb_ary_plus(VALUE, VALUE);
00082 VALUE rb_ary_concat(VALUE, VALUE);
00083 VALUE rb_ary_assoc(VALUE, VALUE);
00084 VALUE rb_ary_rassoc(VALUE, VALUE);
00085 VALUE rb_ary_includes(VALUE, VALUE);
00086 VALUE rb_ary_cmp(VALUE, VALUE);
00087 VALUE rb_ary_replace(VALUE copy, VALUE orig);
00088 VALUE rb_get_values_at(VALUE, long, int, VALUE*, VALUE(*)(VALUE,long));
00089 VALUE rb_ary_resize(VALUE ary, long len);
00090 #define rb_ary_new2 rb_ary_new_capa
00091 #define rb_ary_new3 rb_ary_new_from_args
00092 #define rb_ary_new4 rb_ary_new_from_values
00093
00094 VALUE rb_big_new(long, int);
00095 int rb_bigzero_p(VALUE x);
00096 VALUE rb_big_clone(VALUE);
00097 void rb_big_2comp(VALUE);
00098 VALUE rb_big_norm(VALUE);
00099 void rb_big_resize(VALUE big, long len);
00100 VALUE rb_cstr_to_inum(const char*, int, int);
00101 VALUE rb_str_to_inum(VALUE, int, int);
00102 VALUE rb_cstr2inum(const char*, int);
00103 VALUE rb_str2inum(VALUE, int);
00104 VALUE rb_big2str(VALUE, int);
00105 DEPRECATED(VALUE rb_big2str0(VALUE, int, int));
00106 SIGNED_VALUE rb_big2long(VALUE);
00107 #define rb_big2int(x) rb_big2long(x)
00108 VALUE rb_big2ulong(VALUE);
00109 #define rb_big2uint(x) rb_big2ulong(x)
00110 DEPRECATED(VALUE rb_big2ulong_pack(VALUE x));
00111 #if HAVE_LONG_LONG
00112 LONG_LONG rb_big2ll(VALUE);
00113 unsigned LONG_LONG rb_big2ull(VALUE);
00114 #endif
00115 DEPRECATED(void rb_quad_pack(char*,VALUE));
00116 DEPRECATED(VALUE rb_quad_unpack(const char*,int));
00117 void rb_big_pack(VALUE val, unsigned long *buf, long num_longs);
00118 VALUE rb_big_unpack(unsigned long *buf, long num_longs);
00119 int rb_uv_to_utf8(char[6],unsigned long);
00120 VALUE rb_dbl2big(double);
00121 double rb_big2dbl(VALUE);
00122 VALUE rb_big_cmp(VALUE, VALUE);
00123 VALUE rb_big_eq(VALUE, VALUE);
00124 VALUE rb_big_eql(VALUE, VALUE);
00125 VALUE rb_big_plus(VALUE, VALUE);
00126 VALUE rb_big_minus(VALUE, VALUE);
00127 VALUE rb_big_mul(VALUE, VALUE);
00128 VALUE rb_big_div(VALUE, VALUE);
00129 VALUE rb_big_idiv(VALUE, VALUE);
00130 VALUE rb_big_modulo(VALUE, VALUE);
00131 VALUE rb_big_divmod(VALUE, VALUE);
00132 VALUE rb_big_pow(VALUE, VALUE);
00133 VALUE rb_big_and(VALUE, VALUE);
00134 VALUE rb_big_or(VALUE, VALUE);
00135 VALUE rb_big_xor(VALUE, VALUE);
00136 VALUE rb_big_lshift(VALUE, VALUE);
00137 VALUE rb_big_rshift(VALUE, VALUE);
00138
00139
00140
00141
00142 #define INTEGER_PACK_MSWORD_FIRST 0x01
00143 #define INTEGER_PACK_LSWORD_FIRST 0x02
00144 #define INTEGER_PACK_MSBYTE_FIRST 0x10
00145 #define INTEGER_PACK_LSBYTE_FIRST 0x20
00146 #define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
00147 #define INTEGER_PACK_2COMP 0x80
00148 #define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
00149
00150 #define INTEGER_PACK_FORCE_BIGNUM 0x100
00151 #define INTEGER_PACK_NEGATIVE 0x200
00152
00153 #define INTEGER_PACK_LITTLE_ENDIAN \
00154 (INTEGER_PACK_LSWORD_FIRST | \
00155 INTEGER_PACK_LSBYTE_FIRST)
00156 #define INTEGER_PACK_BIG_ENDIAN \
00157 (INTEGER_PACK_MSWORD_FIRST | \
00158 INTEGER_PACK_MSBYTE_FIRST)
00159 int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
00160 VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
00161 size_t rb_absint_size(VALUE val, int *nlz_bits_ret);
00162 size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret);
00163 int rb_absint_singlebit_p(VALUE val);
00164
00165
00166 VALUE rb_rational_raw(VALUE, VALUE);
00167 #define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
00168 #define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
00169 VALUE rb_rational_new(VALUE, VALUE);
00170 #define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
00171 #define rb_rational_new2(x,y) rb_rational_new((x), (y))
00172 VALUE rb_Rational(VALUE, VALUE);
00173 #define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
00174 #define rb_Rational2(x,y) rb_Rational((x), (y))
00175 VALUE rb_flt_rationalize_with_prec(VALUE, VALUE);
00176 VALUE rb_flt_rationalize(VALUE);
00177
00178 VALUE rb_complex_raw(VALUE, VALUE);
00179 #define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
00180 #define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
00181 VALUE rb_complex_new(VALUE, VALUE);
00182 #define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
00183 #define rb_complex_new2(x,y) rb_complex_new((x), (y))
00184 VALUE rb_complex_polar(VALUE, VALUE);
00185 VALUE rb_Complex(VALUE, VALUE);
00186 #define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
00187 #define rb_Complex2(x,y) rb_Complex((x), (y))
00188
00189 VALUE rb_class_boot(VALUE);
00190 VALUE rb_class_new(VALUE);
00191 VALUE rb_mod_init_copy(VALUE, VALUE);
00192 VALUE rb_singleton_class_clone(VALUE);
00193 void rb_singleton_class_attached(VALUE,VALUE);
00194 VALUE rb_make_metaclass(VALUE, VALUE);
00195 void rb_check_inheritable(VALUE);
00196 VALUE rb_class_inherited(VALUE, VALUE);
00197 VALUE rb_define_class_id(ID, VALUE);
00198 VALUE rb_define_class_id_under(VALUE, ID, VALUE);
00199 VALUE rb_module_new(void);
00200 VALUE rb_define_module_id(ID);
00201 VALUE rb_define_module_id_under(VALUE, ID);
00202 VALUE rb_include_class_new(VALUE, VALUE);
00203 VALUE rb_mod_included_modules(VALUE);
00204 VALUE rb_mod_include_p(VALUE, VALUE);
00205 VALUE rb_mod_ancestors(VALUE);
00206 VALUE rb_class_instance_methods(int, VALUE*, VALUE);
00207 VALUE rb_class_public_instance_methods(int, VALUE*, VALUE);
00208 VALUE rb_class_protected_instance_methods(int, VALUE*, VALUE);
00209 VALUE rb_class_private_instance_methods(int, VALUE*, VALUE);
00210 VALUE rb_obj_singleton_methods(int, VALUE*, VALUE);
00211 void rb_define_method_id(VALUE, ID, VALUE (*)(ANYARGS), int);
00212 void rb_frozen_class_p(VALUE);
00213 void rb_undef(VALUE, ID);
00214 void rb_define_protected_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
00215 void rb_define_private_method(VALUE, const char*, VALUE (*)(ANYARGS), int);
00216 void rb_define_singleton_method(VALUE, const char*, VALUE(*)(ANYARGS), int);
00217 VALUE rb_singleton_class(VALUE);
00218
00219 int rb_cmpint(VALUE, VALUE, VALUE);
00220 NORETURN(void rb_cmperr(VALUE, VALUE));
00221
00222 VALUE rb_fiber_new(VALUE (*)(ANYARGS), VALUE);
00223 VALUE rb_fiber_resume(VALUE fib, int argc, VALUE *args);
00224 VALUE rb_fiber_yield(int argc, VALUE *args);
00225 VALUE rb_fiber_current(void);
00226 VALUE rb_fiber_alive_p(VALUE);
00227
00228 VALUE rb_enum_values_pack(int, const VALUE*);
00229
00230 VALUE rb_enumeratorize(VALUE, VALUE, int, VALUE *);
00231 typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE);
00232 VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, VALUE *, rb_enumerator_size_func *);
00233 #ifndef RUBY_EXPORT
00234 #define rb_enumeratorize_with_size(obj, id, argc, argv, size_fn) \
00235 rb_enumeratorize_with_size(obj, id, argc, argv, (rb_enumerator_size_func *)(size_fn))
00236 #endif
00237 #define RETURN_SIZED_ENUMERATOR(obj, argc, argv, size_fn) do { \
00238 if (!rb_block_given_p()) \
00239 return rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()),\
00240 (argc), (argv), (size_fn)); \
00241 } while (0)
00242 #define RETURN_ENUMERATOR(obj, argc, argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
00243
00244 VALUE rb_exc_new(VALUE, const char*, long);
00245 VALUE rb_exc_new_cstr(VALUE, const char*);
00246 VALUE rb_exc_new_str(VALUE, VALUE);
00247 #define rb_exc_new2 rb_exc_new_cstr
00248 #define rb_exc_new3 rb_exc_new_str
00249 PRINTF_ARGS(NORETURN(void rb_loaderror(const char*, ...)), 1, 2);
00250 PRINTF_ARGS(NORETURN(void rb_loaderror_with_path(VALUE path, const char*, ...)), 2, 3);
00251 PRINTF_ARGS(NORETURN(void rb_name_error(ID, const char*, ...)), 2, 3);
00252 PRINTF_ARGS(NORETURN(void rb_name_error_str(VALUE, const char*, ...)), 2, 3);
00253 NORETURN(void rb_invalid_str(const char*, const char*));
00254 PRINTF_ARGS(void rb_compile_error(const char*, int, const char*, ...), 3, 4);
00255 PRINTF_ARGS(void rb_compile_error_with_enc(const char*, int, void *, const char*, ...), 4, 5);
00256 PRINTF_ARGS(void rb_compile_error_append(const char*, ...), 1, 2);
00257 NORETURN(void rb_error_frozen(const char*));
00258 void rb_error_untrusted(VALUE);
00259 void rb_check_frozen(VALUE);
00260 void rb_check_trusted(VALUE);
00261 #define rb_check_frozen_internal(obj) do { \
00262 VALUE frozen_obj = (obj); \
00263 if (OBJ_FROZEN(frozen_obj)) { \
00264 rb_error_frozen(rb_obj_classname(frozen_obj)); \
00265 } \
00266 } while (0)
00267 #define rb_check_trusted_internal(obj) ((void) 0)
00268 #ifdef __GNUC__
00269 #define rb_check_frozen(obj) __extension__({rb_check_frozen_internal(obj);})
00270 #define rb_check_trusted(obj) __extension__({rb_check_trusted_internal(obj);})
00271 #else
00272 static inline void
00273 rb_check_frozen_inline(VALUE obj)
00274 {
00275 rb_check_frozen_internal(obj);
00276 }
00277 #define rb_check_frozen(obj) rb_check_frozen_inline(obj)
00278 static inline void
00279 rb_check_trusted_inline(VALUE obj)
00280 {
00281 rb_check_trusted_internal(obj);
00282 }
00283 #define rb_check_trusted(obj) rb_check_trusted_inline(obj)
00284 #endif
00285 void rb_check_copyable(VALUE obj, VALUE orig);
00286
00287 #define OBJ_INIT_COPY(obj, orig) \
00288 ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
00289
00290
00291 int rb_sourceline(void);
00292 const char *rb_sourcefile(void);
00293 VALUE rb_check_funcall(VALUE, ID, int, const VALUE*);
00294
00295 NORETURN(void rb_error_arity(int, int, int));
00296 #define rb_check_arity rb_check_arity
00297 static inline void
00298 rb_check_arity(int argc, int min, int max)
00299 {
00300 if ((argc < min) || (max != UNLIMITED_ARGUMENTS && argc > max))
00301 rb_error_arity(argc, min, max);
00302 }
00303
00304 #if defined(NFDBITS) && defined(HAVE_RB_FD_INIT)
00305 typedef struct {
00306 int maxfd;
00307 fd_set *fdset;
00308 } rb_fdset_t;
00309
00310 void rb_fd_init(rb_fdset_t *);
00311 void rb_fd_term(rb_fdset_t *);
00312 void rb_fd_zero(rb_fdset_t *);
00313 void rb_fd_set(int, rb_fdset_t *);
00314 void rb_fd_clr(int, rb_fdset_t *);
00315 int rb_fd_isset(int, const rb_fdset_t *);
00316 void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
00317 void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
00318 int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
00319
00320 #define rb_fd_ptr(f) ((f)->fdset)
00321 #define rb_fd_max(f) ((f)->maxfd)
00322
00323 #elif defined(_WIN32)
00324
00325 typedef struct {
00326 int capa;
00327 fd_set *fdset;
00328 } rb_fdset_t;
00329
00330 void rb_fd_init(rb_fdset_t *);
00331 void rb_fd_term(rb_fdset_t *);
00332 #define rb_fd_zero(f) ((f)->fdset->fd_count = 0)
00333 void rb_fd_set(int, rb_fdset_t *);
00334 #define rb_fd_clr(n, f) rb_w32_fdclr((n), (f)->fdset)
00335 #define rb_fd_isset(n, f) rb_w32_fdisset((n), (f)->fdset)
00336 #define rb_fd_copy(d, s, n) rb_w32_fd_copy((d), (s), (n))
00337 void rb_w32_fd_copy(rb_fdset_t *, const fd_set *, int);
00338 #define rb_fd_dup(d, s) rb_w32_fd_dup((d), (s))
00339 void rb_w32_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
00340 #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))
00341 #define rb_fd_resize(n, f) ((void)(f))
00342
00343 #define rb_fd_ptr(f) ((f)->fdset)
00344 #define rb_fd_max(f) ((f)->fdset->fd_count)
00345
00346 #else
00347
00348 typedef fd_set rb_fdset_t;
00349 #define rb_fd_zero(f) FD_ZERO(f)
00350 #define rb_fd_set(n, f) FD_SET((n), (f))
00351 #define rb_fd_clr(n, f) FD_CLR((n), (f))
00352 #define rb_fd_isset(n, f) FD_ISSET((n), (f))
00353 #define rb_fd_copy(d, s, n) (*(d) = *(s))
00354 #define rb_fd_dup(d, s) (*(d) = *(s))
00355 #define rb_fd_resize(n, f) ((void)(f))
00356 #define rb_fd_ptr(f) (f)
00357 #define rb_fd_init(f) FD_ZERO(f)
00358 #define rb_fd_init_copy(d, s) (*(d) = *(s))
00359 #define rb_fd_term(f) ((void)(f))
00360 #define rb_fd_max(f) FD_SETSIZE
00361 #define rb_fd_select(n, rfds, wfds, efds, timeout) select((n), (rfds), (wfds), (efds), (timeout))
00362
00363 #endif
00364
00365 NORETURN(void rb_exc_raise(VALUE));
00366 NORETURN(void rb_exc_fatal(VALUE));
00367 VALUE rb_f_exit(int,VALUE*);
00368 VALUE rb_f_abort(int,VALUE*);
00369 void rb_remove_method(VALUE, const char*);
00370 void rb_remove_method_id(VALUE, ID);
00371 #define rb_disable_super(klass, name) ((void)0)
00372 #define rb_enable_super(klass, name) ((void)0)
00373 #define HAVE_RB_DEFINE_ALLOC_FUNC 1
00374 typedef VALUE (*rb_alloc_func_t)(VALUE);
00375 void rb_define_alloc_func(VALUE, rb_alloc_func_t);
00376 void rb_undef_alloc_func(VALUE);
00377 rb_alloc_func_t rb_get_alloc_func(VALUE);
00378 void rb_clear_cache(void);
00379 void rb_clear_constant_cache(void);
00380 void rb_clear_method_cache_by_class(VALUE);
00381 void rb_alias(VALUE, ID, ID);
00382 void rb_attr(VALUE,ID,int,int,int);
00383 int rb_method_boundp(VALUE, ID, int);
00384 int rb_method_basic_definition_p(VALUE, ID);
00385 VALUE rb_eval_cmd(VALUE, VALUE, int);
00386 int rb_obj_respond_to(VALUE, ID, int);
00387 int rb_respond_to(VALUE, ID);
00388 VALUE rb_f_notimplement(int argc, VALUE *argv, VALUE obj);
00389 void rb_interrupt(void);
00390 VALUE rb_apply(VALUE, ID, VALUE);
00391 void rb_backtrace(void);
00392 ID rb_frame_this_func(void);
00393 VALUE rb_obj_instance_eval(int, VALUE*, VALUE);
00394 VALUE rb_obj_instance_exec(int, VALUE*, VALUE);
00395 VALUE rb_mod_module_eval(int, VALUE*, VALUE);
00396 VALUE rb_mod_module_exec(int, VALUE*, VALUE);
00397 void rb_load(VALUE, int);
00398 void rb_load_protect(VALUE, int, int*);
00399 NORETURN(void rb_jump_tag(int));
00400 int rb_provided(const char*);
00401 int rb_feature_provided(const char *, const char **);
00402 void rb_provide(const char*);
00403 VALUE rb_f_require(VALUE, VALUE);
00404 VALUE rb_require_safe(VALUE, int);
00405 void rb_obj_call_init(VALUE, int, VALUE*);
00406 VALUE rb_class_new_instance(int, VALUE*, VALUE);
00407 VALUE rb_block_proc(void);
00408 VALUE rb_block_lambda(void);
00409 VALUE rb_proc_new(VALUE (*)(ANYARGS), VALUE);
00410 VALUE rb_obj_is_proc(VALUE);
00411 VALUE rb_proc_call(VALUE, VALUE);
00412 VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE);
00413 int rb_proc_arity(VALUE);
00414 VALUE rb_proc_lambda_p(VALUE);
00415 VALUE rb_binding_new(void);
00416 VALUE rb_obj_method(VALUE, VALUE);
00417 VALUE rb_obj_is_method(VALUE);
00418 VALUE rb_method_call(int, VALUE*, VALUE);
00419 VALUE rb_method_call_with_block(int, VALUE *, VALUE, VALUE);
00420 int rb_mod_method_arity(VALUE, ID);
00421 int rb_obj_method_arity(VALUE, ID);
00422 VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
00423 void rb_set_end_proc(void (*)(VALUE), VALUE);
00424 void rb_exec_end_proc(void);
00425 void rb_thread_schedule(void);
00426 void rb_thread_wait_fd(int);
00427 int rb_thread_fd_writable(int);
00428 void rb_thread_fd_close(int);
00429 int rb_thread_alone(void);
00430 DEPRECATED(void rb_thread_polling(void));
00431 void rb_thread_sleep(int);
00432 void rb_thread_sleep_forever(void);
00433 void rb_thread_sleep_deadly(void);
00434 VALUE rb_thread_stop(void);
00435 VALUE rb_thread_wakeup(VALUE);
00436 VALUE rb_thread_wakeup_alive(VALUE);
00437 VALUE rb_thread_run(VALUE);
00438 VALUE rb_thread_kill(VALUE);
00439 VALUE rb_thread_create(VALUE (*)(ANYARGS), void*);
00440 DEPRECATED(int rb_thread_select(int, fd_set *, fd_set *, fd_set *, struct timeval *));
00441 int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
00442 void rb_thread_wait_for(struct timeval);
00443 VALUE rb_thread_current(void);
00444 VALUE rb_thread_main(void);
00445 VALUE rb_thread_local_aref(VALUE, ID);
00446 VALUE rb_thread_local_aset(VALUE, ID, VALUE);
00447 void rb_thread_atfork(void);
00448 void rb_thread_atfork_before_exec(void);
00449 VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
00450 VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
00451 VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
00452 VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
00453
00454 VALUE rb_dir_getwd(void);
00455
00456 VALUE rb_file_s_expand_path(int, VALUE *);
00457 VALUE rb_file_expand_path(VALUE, VALUE);
00458 VALUE rb_file_s_absolute_path(int, VALUE *);
00459 VALUE rb_file_absolute_path(VALUE, VALUE);
00460 VALUE rb_file_dirname(VALUE fname);
00461 int rb_find_file_ext_safe(VALUE*, const char* const*, int);
00462 VALUE rb_find_file_safe(VALUE, int);
00463 int rb_find_file_ext(VALUE*, const char* const*);
00464 VALUE rb_find_file(VALUE);
00465 VALUE rb_file_directory_p(VALUE,VALUE);
00466 VALUE rb_str_encode_ospath(VALUE);
00467 int rb_is_absolute_path(const char *);
00468
00469 NORETURN(void rb_memerror(void));
00470 int rb_during_gc(void);
00471 void rb_gc_mark_locations(VALUE*, VALUE*);
00472 void rb_mark_tbl(struct st_table*);
00473 void rb_mark_set(struct st_table*);
00474 void rb_mark_hash(struct st_table*);
00475 void rb_gc_mark_maybe(VALUE);
00476 void rb_gc_mark(VALUE);
00477 void rb_gc_force_recycle(VALUE);
00478 void rb_gc(void);
00479 void rb_gc_copy_finalizer(VALUE,VALUE);
00480 void rb_gc_finalize_deferred(void);
00481 void rb_gc_call_finalizer_at_exit(void);
00482 VALUE rb_gc_enable(void);
00483 VALUE rb_gc_disable(void);
00484 VALUE rb_gc_start(void);
00485 DEPRECATED(void rb_gc_set_params(void));
00486 VALUE rb_define_finalizer(VALUE, VALUE);
00487 VALUE rb_undefine_finalizer(VALUE);
00488 size_t rb_gc_count(void);
00489 size_t rb_gc_stat(VALUE);
00490 VALUE rb_gc_latest_gc_info(VALUE);
00491
00492 void st_foreach_safe(struct st_table *, int (*)(ANYARGS), st_data_t);
00493 VALUE rb_check_hash_type(VALUE);
00494 void rb_hash_foreach(VALUE, int (*)(ANYARGS), VALUE);
00495 VALUE rb_hash(VALUE);
00496 VALUE rb_hash_new(void);
00497 VALUE rb_hash_dup(VALUE);
00498 VALUE rb_hash_freeze(VALUE);
00499 VALUE rb_hash_aref(VALUE, VALUE);
00500 VALUE rb_hash_lookup(VALUE, VALUE);
00501 VALUE rb_hash_lookup2(VALUE, VALUE, VALUE);
00502 VALUE rb_hash_fetch(VALUE, VALUE);
00503 VALUE rb_hash_aset(VALUE, VALUE, VALUE);
00504 VALUE rb_hash_clear(VALUE);
00505 VALUE rb_hash_delete_if(VALUE);
00506 VALUE rb_hash_delete(VALUE,VALUE);
00507 VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
00508 typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value);
00509 VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func);
00510 struct st_table *rb_hash_tbl(VALUE);
00511 int rb_path_check(const char*);
00512 int rb_env_path_tainted(void);
00513 VALUE rb_env_clear(void);
00514
00515 #define rb_defout rb_stdout
00516 RUBY_EXTERN VALUE rb_fs;
00517 RUBY_EXTERN VALUE rb_output_fs;
00518 RUBY_EXTERN VALUE rb_rs;
00519 RUBY_EXTERN VALUE rb_default_rs;
00520 RUBY_EXTERN VALUE rb_output_rs;
00521 VALUE rb_io_write(VALUE, VALUE);
00522 VALUE rb_io_gets(VALUE);
00523 VALUE rb_io_getbyte(VALUE);
00524 VALUE rb_io_ungetc(VALUE, VALUE);
00525 VALUE rb_io_ungetbyte(VALUE, VALUE);
00526 VALUE rb_io_close(VALUE);
00527 VALUE rb_io_flush(VALUE);
00528 VALUE rb_io_eof(VALUE);
00529 VALUE rb_io_binmode(VALUE);
00530 VALUE rb_io_ascii8bit_binmode(VALUE);
00531 VALUE rb_io_addstr(VALUE, VALUE);
00532 VALUE rb_io_printf(int, VALUE*, VALUE);
00533 VALUE rb_io_print(int, VALUE*, VALUE);
00534 VALUE rb_io_puts(int, VALUE*, VALUE);
00535 VALUE rb_io_fdopen(int, int, const char*);
00536 VALUE rb_io_get_io(VALUE);
00537 VALUE rb_file_open(const char*, const char*);
00538 VALUE rb_file_open_str(VALUE, const char*);
00539 VALUE rb_gets(void);
00540 void rb_write_error(const char*);
00541 void rb_write_error2(const char*, long);
00542 void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds);
00543 int rb_pipe(int *pipes);
00544 int rb_reserved_fd_p(int fd);
00545 int rb_cloexec_open(const char *pathname, int flags, mode_t mode);
00546 int rb_cloexec_dup(int oldfd);
00547 int rb_cloexec_dup2(int oldfd, int newfd);
00548 int rb_cloexec_pipe(int fildes[2]);
00549 int rb_cloexec_fcntl_dupfd(int fd, int minfd);
00550 #define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
00551 void rb_update_max_fd(int fd);
00552 void rb_fd_fix_cloexec(int fd);
00553
00554 VALUE rb_marshal_dump(VALUE, VALUE);
00555 VALUE rb_marshal_load(VALUE);
00556 void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE));
00557
00558 NORETURN(void rb_num_zerodiv(void));
00559 #define RB_NUM_COERCE_FUNCS_NEED_OPID 1
00560 VALUE rb_num_coerce_bin(VALUE, VALUE, ID);
00561 VALUE rb_num_coerce_cmp(VALUE, VALUE, ID);
00562 VALUE rb_num_coerce_relop(VALUE, VALUE, ID);
00563 VALUE rb_num_coerce_bit(VALUE, VALUE, ID);
00564 VALUE rb_num2fix(VALUE);
00565 VALUE rb_fix2str(VALUE, int);
00566 VALUE rb_dbl_cmp(double, double);
00567
00568 int rb_eql(VALUE, VALUE);
00569 VALUE rb_any_to_s(VALUE);
00570 VALUE rb_inspect(VALUE);
00571 VALUE rb_obj_is_instance_of(VALUE, VALUE);
00572 VALUE rb_obj_is_kind_of(VALUE, VALUE);
00573 VALUE rb_obj_alloc(VALUE);
00574 VALUE rb_obj_clone(VALUE);
00575 VALUE rb_obj_dup(VALUE);
00576 VALUE rb_obj_init_copy(VALUE,VALUE);
00577 VALUE rb_obj_taint(VALUE);
00578 VALUE rb_obj_tainted(VALUE);
00579 VALUE rb_obj_untaint(VALUE);
00580 VALUE rb_obj_untrust(VALUE);
00581 VALUE rb_obj_untrusted(VALUE);
00582 VALUE rb_obj_trust(VALUE);
00583 VALUE rb_obj_freeze(VALUE);
00584 VALUE rb_obj_frozen_p(VALUE);
00585 VALUE rb_obj_id(VALUE);
00586 VALUE rb_obj_class(VALUE);
00587 VALUE rb_class_real(VALUE);
00588 VALUE rb_class_inherited_p(VALUE, VALUE);
00589 VALUE rb_class_superclass(VALUE);
00590 VALUE rb_class_get_superclass(VALUE);
00591 VALUE rb_convert_type(VALUE,int,const char*,const char*);
00592 VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
00593 VALUE rb_check_to_integer(VALUE, const char *);
00594 VALUE rb_check_to_float(VALUE);
00595 VALUE rb_to_int(VALUE);
00596 VALUE rb_check_to_int(VALUE);
00597 VALUE rb_Integer(VALUE);
00598 VALUE rb_to_float(VALUE);
00599 VALUE rb_Float(VALUE);
00600 VALUE rb_String(VALUE);
00601 VALUE rb_Array(VALUE);
00602 VALUE rb_Hash(VALUE);
00603 double rb_cstr_to_dbl(const char*, int);
00604 double rb_str_to_dbl(VALUE, int);
00605
00606 RUBY_EXTERN int ruby_sourceline;
00607 RUBY_EXTERN char *ruby_sourcefile;
00608 ID rb_id_attrset(ID);
00609 int rb_is_const_id(ID);
00610 int rb_is_global_id(ID);
00611 int rb_is_instance_id(ID);
00612 int rb_is_attrset_id(ID);
00613 int rb_is_class_id(ID);
00614 int rb_is_local_id(ID);
00615 int rb_is_junk_id(ID);
00616 int rb_symname_p(const char*);
00617 int rb_sym_interned_p(VALUE);
00618 VALUE rb_backref_get(void);
00619 void rb_backref_set(VALUE);
00620 VALUE rb_lastline_get(void);
00621 void rb_lastline_set(VALUE);
00622 VALUE rb_sym_all_symbols(void);
00623
00624 void rb_last_status_set(int status, rb_pid_t pid);
00625 VALUE rb_last_status_get(void);
00626 struct rb_exec_arg {
00627 VALUE execarg_obj;
00628 };
00629 DEPRECATED(int rb_proc_exec_n(int, VALUE*, const char*));
00630 int rb_proc_exec(const char*);
00631 DEPRECATED(VALUE rb_exec_arg_init(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e));
00632 DEPRECATED(int rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val));
00633 DEPRECATED(void rb_exec_arg_fixup(struct rb_exec_arg *e));
00634 DEPRECATED(int rb_run_exec_options(const struct rb_exec_arg *e, struct rb_exec_arg *s));
00635 DEPRECATED(int rb_run_exec_options_err(const struct rb_exec_arg *e, struct rb_exec_arg *s, char*, size_t));
00636 DEPRECATED(int rb_exec(const struct rb_exec_arg*));
00637 DEPRECATED(int rb_exec_err(const struct rb_exec_arg*, char*, size_t));
00638 DEPRECATED(rb_pid_t rb_fork(int*, int (*)(void*), void*, VALUE));
00639 DEPRECATED(rb_pid_t rb_fork_err(int*, int (*)(void*, char*, size_t), void*, VALUE, char*, size_t));
00640 VALUE rb_f_exec(int,VALUE*);
00641 rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags);
00642 void rb_syswait(rb_pid_t pid);
00643 rb_pid_t rb_spawn(int, VALUE*);
00644 rb_pid_t rb_spawn_err(int, VALUE*, char*, size_t);
00645 VALUE rb_proc_times(VALUE);
00646 VALUE rb_detach_process(rb_pid_t pid);
00647
00648 VALUE rb_range_new(VALUE, VALUE, int);
00649 VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
00650 int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
00651
00652 unsigned int rb_genrand_int32(void);
00653 double rb_genrand_real(void);
00654 void rb_reset_random_seed(void);
00655 VALUE rb_random_bytes(VALUE rnd, long n);
00656 VALUE rb_random_int(VALUE rnd, VALUE max);
00657 unsigned int rb_random_int32(VALUE rnd);
00658 double rb_random_real(VALUE rnd);
00659 unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
00660 unsigned long rb_genrand_ulong_limited(unsigned long i);
00661
00662 #define rb_memcmp memcmp
00663 int rb_memcicmp(const void*,const void*,long);
00664 void rb_match_busy(VALUE);
00665 VALUE rb_reg_nth_defined(int, VALUE);
00666 VALUE rb_reg_nth_match(int, VALUE);
00667 int rb_reg_backref_number(VALUE match, VALUE backref);
00668 VALUE rb_reg_last_match(VALUE);
00669 VALUE rb_reg_match_pre(VALUE);
00670 VALUE rb_reg_match_post(VALUE);
00671 VALUE rb_reg_match_last(VALUE);
00672 #define HAVE_RB_REG_NEW_STR 1
00673 VALUE rb_reg_new_str(VALUE, int);
00674 VALUE rb_reg_new(const char *, long, int);
00675 VALUE rb_reg_alloc(void);
00676 VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
00677 VALUE rb_reg_match(VALUE, VALUE);
00678 VALUE rb_reg_match2(VALUE);
00679 int rb_reg_options(VALUE);
00680
00681 #define rb_argv rb_get_argv()
00682 RUBY_EXTERN VALUE rb_argv0;
00683 VALUE rb_get_argv(void);
00684 void *rb_load_file(const char*);
00685 void *rb_load_file_str(VALUE);
00686
00687 VALUE rb_f_kill(int, VALUE*);
00688 #ifdef POSIX_SIGNAL
00689 #define posix_signal ruby_posix_signal
00690 RETSIGTYPE (*posix_signal(int, RETSIGTYPE (*)(int)))(int);
00691 #endif
00692 void rb_trap_exit(void);
00693 void rb_trap_exec(void);
00694 const char *ruby_signal_name(int);
00695 void ruby_default_signal(int);
00696
00697 VALUE rb_f_sprintf(int, const VALUE*);
00698 PRINTF_ARGS(VALUE rb_sprintf(const char*, ...), 1, 2);
00699 VALUE rb_vsprintf(const char*, va_list);
00700 PRINTF_ARGS(VALUE rb_str_catf(VALUE, const char*, ...), 2, 3);
00701 VALUE rb_str_vcatf(VALUE, const char*, va_list);
00702 VALUE rb_str_format(int, const VALUE *, VALUE);
00703
00704 VALUE rb_str_new(const char*, long);
00705 VALUE rb_str_new_cstr(const char*);
00706 VALUE rb_str_new_shared(VALUE);
00707 VALUE rb_str_new_frozen(VALUE);
00708 VALUE rb_str_new_with_class(VALUE, const char*, long);
00709 VALUE rb_tainted_str_new_cstr(const char*);
00710 VALUE rb_tainted_str_new(const char*, long);
00711 VALUE rb_external_str_new(const char*, long);
00712 VALUE rb_external_str_new_cstr(const char*);
00713 VALUE rb_locale_str_new(const char*, long);
00714 VALUE rb_locale_str_new_cstr(const char*);
00715 VALUE rb_filesystem_str_new(const char*, long);
00716 VALUE rb_filesystem_str_new_cstr(const char*);
00717 VALUE rb_str_buf_new(long);
00718 VALUE rb_str_buf_new_cstr(const char*);
00719 VALUE rb_str_buf_new2(const char*);
00720 VALUE rb_str_tmp_new(long);
00721 VALUE rb_usascii_str_new(const char*, long);
00722 VALUE rb_usascii_str_new_cstr(const char*);
00723 void rb_str_free(VALUE);
00724 void rb_str_shared_replace(VALUE, VALUE);
00725 VALUE rb_str_buf_append(VALUE, VALUE);
00726 VALUE rb_str_buf_cat(VALUE, const char*, long);
00727 VALUE rb_str_buf_cat2(VALUE, const char*);
00728 VALUE rb_str_buf_cat_ascii(VALUE, const char*);
00729 VALUE rb_obj_as_string(VALUE);
00730 VALUE rb_check_string_type(VALUE);
00731 void rb_must_asciicompat(VALUE);
00732 VALUE rb_str_dup(VALUE);
00733 VALUE rb_str_resurrect(VALUE str);
00734 VALUE rb_str_locktmp(VALUE);
00735 VALUE rb_str_unlocktmp(VALUE);
00736 VALUE rb_str_dup_frozen(VALUE);
00737 #define rb_str_dup_frozen rb_str_new_frozen
00738 VALUE rb_str_plus(VALUE, VALUE);
00739 VALUE rb_str_times(VALUE, VALUE);
00740 long rb_str_sublen(VALUE, long);
00741 VALUE rb_str_substr(VALUE, long, long);
00742 VALUE rb_str_subseq(VALUE, long, long);
00743 char *rb_str_subpos(VALUE, long, long*);
00744 void rb_str_modify(VALUE);
00745 void rb_str_modify_expand(VALUE, long);
00746 VALUE rb_str_freeze(VALUE);
00747 void rb_str_set_len(VALUE, long);
00748 VALUE rb_str_resize(VALUE, long);
00749 VALUE rb_str_cat(VALUE, const char*, long);
00750 VALUE rb_str_cat2(VALUE, const char*);
00751 VALUE rb_str_append(VALUE, VALUE);
00752 VALUE rb_str_concat(VALUE, VALUE);
00753 st_index_t rb_memhash(const void *ptr, long len);
00754 st_index_t rb_hash_start(st_index_t);
00755 st_index_t rb_hash_uint32(st_index_t, uint32_t);
00756 st_index_t rb_hash_uint(st_index_t, st_index_t);
00757 st_index_t rb_hash_end(st_index_t);
00758 #define rb_hash_uint32(h, i) st_hash_uint32((h), (i))
00759 #define rb_hash_uint(h, i) st_hash_uint((h), (i))
00760 #define rb_hash_end(h) st_hash_end(h)
00761 st_index_t rb_str_hash(VALUE);
00762 int rb_str_hash_cmp(VALUE,VALUE);
00763 int rb_str_comparable(VALUE, VALUE);
00764 int rb_str_cmp(VALUE, VALUE);
00765 VALUE rb_str_equal(VALUE str1, VALUE str2);
00766 VALUE rb_str_drop_bytes(VALUE, long);
00767 void rb_str_update(VALUE, long, long, VALUE);
00768 VALUE rb_str_replace(VALUE, VALUE);
00769 VALUE rb_str_inspect(VALUE);
00770 VALUE rb_str_dump(VALUE);
00771 VALUE rb_str_split(VALUE, const char*);
00772 void rb_str_associate(VALUE, VALUE);
00773 VALUE rb_str_associated(VALUE);
00774 void rb_str_setter(VALUE, ID, VALUE*);
00775 VALUE rb_str_intern(VALUE);
00776 VALUE rb_sym_to_s(VALUE);
00777 long rb_str_strlen(VALUE);
00778 VALUE rb_str_length(VALUE);
00779 long rb_str_offset(VALUE, long);
00780 size_t rb_str_capacity(VALUE);
00781 VALUE rb_str_ellipsize(VALUE, long);
00782 VALUE rb_str_scrub(VALUE, VALUE);
00783 #if defined(__GNUC__) && !defined(__PCC__)
00784 #define rb_str_new_cstr(str) __extension__ ( \
00785 { \
00786 (__builtin_constant_p(str)) ? \
00787 rb_str_new((str), (long)strlen(str)) : \
00788 rb_str_new_cstr(str); \
00789 })
00790 #define rb_tainted_str_new_cstr(str) __extension__ ( \
00791 { \
00792 (__builtin_constant_p(str)) ? \
00793 rb_tainted_str_new((str), (long)strlen(str)) : \
00794 rb_tainted_str_new_cstr(str); \
00795 })
00796 #define rb_usascii_str_new_cstr(str) __extension__ ( \
00797 { \
00798 (__builtin_constant_p(str)) ? \
00799 rb_usascii_str_new((str), (long)strlen(str)) : \
00800 rb_usascii_str_new_cstr(str); \
00801 })
00802 #define rb_external_str_new_cstr(str) __extension__ ( \
00803 { \
00804 (__builtin_constant_p(str)) ? \
00805 rb_external_str_new((str), (long)strlen(str)) : \
00806 rb_external_str_new_cstr(str); \
00807 })
00808 #define rb_locale_str_new_cstr(str) __extension__ ( \
00809 { \
00810 (__builtin_constant_p(str)) ? \
00811 rb_locale_str_new((str), (long)strlen(str)) : \
00812 rb_locale_str_new_cstr(str); \
00813 })
00814 #define rb_str_buf_new_cstr(str) __extension__ ( \
00815 { \
00816 (__builtin_constant_p(str)) ? \
00817 rb_str_buf_cat(rb_str_buf_new((long)strlen(str)), \
00818 (str), (long)strlen(str)) : \
00819 rb_str_buf_new_cstr(str); \
00820 })
00821 #define rb_str_buf_cat2(str, ptr) __extension__ ( \
00822 { \
00823 (__builtin_constant_p(ptr)) ? \
00824 rb_str_buf_cat((str), (ptr), (long)strlen(ptr)) : \
00825 rb_str_buf_cat2((str), (ptr)); \
00826 })
00827 #define rb_str_cat2(str, ptr) __extension__ ( \
00828 { \
00829 (__builtin_constant_p(ptr)) ? \
00830 rb_str_cat((str), (ptr), (long)strlen(ptr)) : \
00831 rb_str_cat2((str), (ptr)); \
00832 })
00833 #define rb_exc_new_cstr(klass, ptr) __extension__ ( \
00834 { \
00835 (__builtin_constant_p(ptr)) ? \
00836 rb_exc_new((klass), (ptr), (long)strlen(ptr)) : \
00837 rb_exc_new_cstr((klass), (ptr)); \
00838 })
00839 #endif
00840 #define rb_str_new2 rb_str_new_cstr
00841 #define rb_str_new3 rb_str_new_shared
00842 #define rb_str_new4 rb_str_new_frozen
00843 #define rb_str_new5 rb_str_new_with_class
00844 #define rb_tainted_str_new2 rb_tainted_str_new_cstr
00845 #define rb_str_buf_new2 rb_str_buf_new_cstr
00846 #define rb_usascii_str_new2 rb_usascii_str_new_cstr
00847
00848 VALUE rb_struct_new(VALUE, ...);
00849 VALUE rb_struct_define(const char*, ...);
00850 VALUE rb_struct_define_under(VALUE, const char*, ...);
00851 VALUE rb_struct_alloc(VALUE, VALUE);
00852 VALUE rb_struct_initialize(VALUE, VALUE);
00853 VALUE rb_struct_aref(VALUE, VALUE);
00854 VALUE rb_struct_aset(VALUE, VALUE, VALUE);
00855 VALUE rb_struct_getmember(VALUE, ID);
00856 DEPRECATED(VALUE rb_struct_iv_get(VALUE, const char*));
00857 VALUE rb_struct_s_members(VALUE);
00858 VALUE rb_struct_members(VALUE);
00859 VALUE rb_struct_alloc_noinit(VALUE);
00860 VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...);
00861 VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
00862
00863
00864 typedef void rb_unblock_function_t(void *);
00865 typedef VALUE rb_blocking_function_t(void *);
00866 void rb_thread_check_ints(void);
00867 int rb_thread_interrupted(VALUE thval);
00868
00869
00870 DEPRECATED(VALUE rb_thread_blocking_region(rb_blocking_function_t *func, void *data1,
00871 rb_unblock_function_t *ubf, void *data2));
00872 #define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
00873 #define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
00874 VALUE rb_mutex_new(void);
00875 VALUE rb_mutex_locked_p(VALUE mutex);
00876 VALUE rb_mutex_trylock(VALUE mutex);
00877 VALUE rb_mutex_lock(VALUE mutex);
00878 VALUE rb_mutex_unlock(VALUE mutex);
00879 VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
00880 VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
00881
00882 VALUE rb_time_new(time_t, long);
00883 VALUE rb_time_nano_new(time_t, long);
00884 VALUE rb_time_num_new(VALUE, VALUE);
00885 struct timeval rb_time_interval(VALUE num);
00886 struct timeval rb_time_timeval(VALUE time);
00887 struct timespec rb_time_timespec(VALUE time);
00888
00889 VALUE rb_mod_name(VALUE);
00890 VALUE rb_class_path(VALUE);
00891 VALUE rb_class_path_cached(VALUE);
00892 void rb_set_class_path(VALUE, VALUE, const char*);
00893 void rb_set_class_path_string(VALUE, VALUE, VALUE);
00894 VALUE rb_path_to_class(VALUE);
00895 VALUE rb_path2class(const char*);
00896 void rb_name_class(VALUE, ID);
00897 VALUE rb_class_name(VALUE);
00898 void rb_autoload(VALUE, ID, const char*);
00899 VALUE rb_autoload_load(VALUE, ID);
00900 VALUE rb_autoload_p(VALUE, ID);
00901 VALUE rb_f_trace_var(int, VALUE*);
00902 VALUE rb_f_untrace_var(int, VALUE*);
00903 VALUE rb_f_global_variables(void);
00904 void rb_alias_variable(ID, ID);
00905 struct st_table* rb_generic_ivar_table(VALUE);
00906 void rb_copy_generic_ivar(VALUE,VALUE);
00907 void rb_free_generic_ivar(VALUE);
00908 VALUE rb_ivar_get(VALUE, ID);
00909 VALUE rb_ivar_set(VALUE, ID, VALUE);
00910 VALUE rb_ivar_defined(VALUE, ID);
00911 void rb_ivar_foreach(VALUE, int (*)(ANYARGS), st_data_t);
00912 st_index_t rb_ivar_count(VALUE);
00913 VALUE rb_attr_get(VALUE, ID);
00914 VALUE rb_obj_instance_variables(VALUE);
00915 VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
00916 void *rb_mod_const_at(VALUE, void*);
00917 void *rb_mod_const_of(VALUE, void*);
00918 VALUE rb_const_list(void*);
00919 VALUE rb_mod_constants(int, VALUE *, VALUE);
00920 VALUE rb_mod_remove_const(VALUE, VALUE);
00921 int rb_const_defined(VALUE, ID);
00922 int rb_const_defined_at(VALUE, ID);
00923 int rb_const_defined_from(VALUE, ID);
00924 VALUE rb_const_get(VALUE, ID);
00925 VALUE rb_const_get_at(VALUE, ID);
00926 VALUE rb_const_get_from(VALUE, ID);
00927 void rb_const_set(VALUE, ID, VALUE);
00928 VALUE rb_const_remove(VALUE, ID);
00929 VALUE rb_mod_const_missing(VALUE,VALUE);
00930 VALUE rb_cvar_defined(VALUE, ID);
00931 void rb_cvar_set(VALUE, ID, VALUE);
00932 VALUE rb_cvar_get(VALUE, ID);
00933 void rb_cv_set(VALUE, const char*, VALUE);
00934 VALUE rb_cv_get(VALUE, const char*);
00935 void rb_define_class_variable(VALUE, const char*, VALUE);
00936 VALUE rb_mod_class_variables(int, VALUE*, VALUE);
00937 VALUE rb_mod_remove_cvar(VALUE, VALUE);
00938
00939 ID rb_frame_callee(void);
00940 VALUE rb_str_succ(VALUE);
00941 VALUE rb_time_succ(VALUE);
00942 int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
00943 VALUE rb_make_backtrace(void);
00944 VALUE rb_make_exception(int, VALUE*);
00945
00946
00947 DEPRECATED(void rb_frame_pop(void));
00948
00949
00950 RUBY_SYMBOL_EXPORT_END
00951
00952 #if defined(__cplusplus)
00953 #if 0
00954 {
00955 #endif
00956 }
00957 #endif
00958
00959 #endif
00960