2000-05-01 13:42:38 +04:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
intern.h -
|
|
|
|
|
|
|
|
$Author$
|
|
|
|
$Date$
|
|
|
|
created at: Thu Jun 10 14:22:17 JST 1993
|
|
|
|
|
2003-01-16 10:34:03 +03:00
|
|
|
Copyright (C) 1993-2003 Yukihiro Matsumoto
|
2000-05-01 13:42:38 +04:00
|
|
|
Copyright (C) 2000 Network Applied Communication Laboratory, Inc.
|
2000-05-09 08:53:16 +04:00
|
|
|
Copyright (C) 2000 Information-technology Promotion Agency, Japan
|
2000-05-01 13:42:38 +04:00
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Functions and variables that are used by more than one source file of
|
|
|
|
* the kernel.
|
1998-01-16 15:19:09 +03:00
|
|
|
*/
|
|
|
|
|
2003-01-08 09:59:38 +03:00
|
|
|
#define ID_ALLOCATOR 1
|
2002-12-20 11:33:17 +03:00
|
|
|
|
1998-01-16 15:19:09 +03:00
|
|
|
/* array.c */
|
2000-11-20 10:31:55 +03:00
|
|
|
void rb_mem_clear _((register VALUE*, register long));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_assoc_new _((VALUE, VALUE));
|
2003-01-06 14:47:53 +03:00
|
|
|
VALUE rb_check_array_type _((VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_ary_new _((void));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_ary_new2 _((long));
|
|
|
|
VALUE rb_ary_new3 __((long,...));
|
2002-04-18 12:46:18 +04:00
|
|
|
VALUE rb_ary_new4 _((long, const VALUE *));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_ary_freeze _((VALUE));
|
|
|
|
VALUE rb_ary_aref _((int, VALUE*, VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
void rb_ary_store _((VALUE, long, VALUE));
|
2001-07-14 19:17:19 +04:00
|
|
|
VALUE rb_ary_dup _((VALUE));
|
2001-06-19 08:35:17 +04:00
|
|
|
VALUE rb_ary_to_ary _((VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_ary_to_s _((VALUE));
|
|
|
|
VALUE rb_ary_push _((VALUE, VALUE));
|
|
|
|
VALUE rb_ary_pop _((VALUE));
|
|
|
|
VALUE rb_ary_shift _((VALUE));
|
|
|
|
VALUE rb_ary_unshift _((VALUE, VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_ary_entry _((VALUE, long));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_ary_each _((VALUE));
|
|
|
|
VALUE rb_ary_join _((VALUE, VALUE));
|
|
|
|
VALUE rb_ary_print_on _((VALUE, VALUE));
|
|
|
|
VALUE rb_ary_reverse _((VALUE));
|
|
|
|
VALUE rb_ary_sort _((VALUE));
|
|
|
|
VALUE rb_ary_sort_bang _((VALUE));
|
|
|
|
VALUE rb_ary_delete _((VALUE, VALUE));
|
2000-01-05 07:41:21 +03:00
|
|
|
VALUE rb_ary_delete_at _((VALUE, long));
|
2001-03-13 08:45:13 +03:00
|
|
|
VALUE rb_ary_clear _((VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_ary_plus _((VALUE, VALUE));
|
|
|
|
VALUE rb_ary_concat _((VALUE, VALUE));
|
|
|
|
VALUE rb_ary_assoc _((VALUE, VALUE));
|
|
|
|
VALUE rb_ary_rassoc _((VALUE, VALUE));
|
|
|
|
VALUE rb_ary_includes _((VALUE, VALUE));
|
2001-08-23 10:02:15 +04:00
|
|
|
VALUE rb_ary_cmp _((VALUE, VALUE));
|
2001-10-29 09:16:01 +03:00
|
|
|
VALUE rb_protect_inspect _((VALUE(*)(ANYARGS),VALUE,VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_inspecting_p _((VALUE));
|
2002-12-19 12:20:20 +03:00
|
|
|
VALUE rb_check_array_value _((VALUE));
|
2003-07-03 15:02:53 +04:00
|
|
|
VALUE rb_values_at _((VALUE, long, int, VALUE*, VALUE(*) _((VALUE,long))));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* bignum.c */
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_big_clone _((VALUE));
|
|
|
|
void rb_big_2comp _((VALUE));
|
|
|
|
VALUE rb_big_norm _((VALUE));
|
|
|
|
VALUE rb_uint2big _((unsigned long));
|
|
|
|
VALUE rb_int2big _((long));
|
|
|
|
VALUE rb_uint2inum _((unsigned long));
|
|
|
|
VALUE rb_int2inum _((long));
|
2002-02-01 13:23:22 +03:00
|
|
|
VALUE rb_cstr_to_inum _((const char*, int, int));
|
|
|
|
VALUE rb_str_to_inum _((VALUE, int, int));
|
2000-01-05 07:41:21 +03:00
|
|
|
VALUE rb_cstr2inum _((const char*, int));
|
|
|
|
VALUE rb_str2inum _((VALUE, int));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_big2str _((VALUE, int));
|
|
|
|
long rb_big2long _((VALUE));
|
|
|
|
#define rb_big2int(x) rb_big2long(x)
|
|
|
|
unsigned long rb_big2ulong _((VALUE));
|
|
|
|
#define rb_big2uint(x) rb_big2ulong(x)
|
2002-03-14 09:23:46 +03:00
|
|
|
#if HAVE_LONG_LONG
|
* bignum.c, intern.h (rb_ull2big, rb_ll2big, rb_ull2inum, rb_ll2inum,
big2ull, rb_big2ull, rb_big2ll): use LONG_LONG macro instead of
long long.
* numeric.c, intern.h, ruby.h (rb_num2ll, rb_num2ull): ditto.
* ruby.h: use _I64_MAX and _I64_MIN if they are defined (for VC++).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-15 11:51:31 +03:00
|
|
|
VALUE rb_ll2inum _((LONG_LONG));
|
|
|
|
VALUE rb_ull2inum _((unsigned LONG_LONG));
|
|
|
|
LONG_LONG rb_big2ll _((VALUE));
|
|
|
|
unsigned LONG_LONG rb_big2ull _((VALUE));
|
2002-03-14 09:23:46 +03:00
|
|
|
#endif /* HAVE_LONG_LONG */
|
2002-02-13 12:01:11 +03:00
|
|
|
void rb_quad_pack _((char*,VALUE));
|
|
|
|
VALUE rb_quad_unpack _((const char*,int));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_dbl2big _((double));
|
|
|
|
double rb_big2dbl _((VALUE));
|
|
|
|
VALUE rb_big_plus _((VALUE, VALUE));
|
|
|
|
VALUE rb_big_minus _((VALUE, VALUE));
|
|
|
|
VALUE rb_big_mul _((VALUE, VALUE));
|
2000-05-12 13:07:57 +04:00
|
|
|
VALUE rb_big_divmod _((VALUE, VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_big_pow _((VALUE, VALUE));
|
|
|
|
VALUE rb_big_and _((VALUE, VALUE));
|
|
|
|
VALUE rb_big_or _((VALUE, VALUE));
|
|
|
|
VALUE rb_big_xor _((VALUE, VALUE));
|
|
|
|
VALUE rb_big_lshift _((VALUE, VALUE));
|
2002-07-26 10:12:39 +04:00
|
|
|
VALUE rb_big_rand _((VALUE, double*));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* class.c */
|
2001-07-18 09:56:05 +04:00
|
|
|
VALUE rb_class_boot _((VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_class_new _((VALUE));
|
2001-05-02 08:22:21 +04:00
|
|
|
VALUE rb_mod_clone _((VALUE));
|
|
|
|
VALUE rb_mod_dup _((VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_singleton_class_clone _((VALUE));
|
|
|
|
void rb_singleton_class_attached _((VALUE,VALUE));
|
2002-01-10 23:18:39 +03:00
|
|
|
VALUE rb_make_metaclass _((VALUE, VALUE));
|
|
|
|
VALUE rb_class_inherited _((VALUE, VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
VALUE rb_define_class_id _((ID, VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_module_new _((void));
|
1998-01-16 15:19:09 +03:00
|
|
|
VALUE rb_define_module_id _((ID));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_mod_included_modules _((VALUE));
|
2001-07-24 13:07:33 +04:00
|
|
|
VALUE rb_mod_include_p _((VALUE, VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_mod_ancestors _((VALUE));
|
|
|
|
VALUE rb_class_instance_methods _((int, VALUE*, VALUE));
|
2002-10-30 11:04:32 +03:00
|
|
|
VALUE rb_class_public_instance_methods _((int, VALUE*, VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_class_protected_instance_methods _((int, VALUE*, VALUE));
|
|
|
|
VALUE rb_class_private_instance_methods _((int, VALUE*, VALUE));
|
2001-05-30 13:12:34 +04:00
|
|
|
VALUE rb_obj_singleton_methods _((int, VALUE*, VALUE));
|
2001-05-02 08:22:21 +04:00
|
|
|
void rb_define_method_id _((VALUE, ID, VALUE (*)(ANYARGS), int));
|
2000-12-18 12:46:21 +03:00
|
|
|
void rb_frozen_class_p _((VALUE));
|
|
|
|
void rb_undef _((VALUE, ID));
|
2001-05-02 08:22:21 +04:00
|
|
|
void rb_define_protected_method _((VALUE, const char*, VALUE (*)(ANYARGS), int));
|
|
|
|
void rb_define_private_method _((VALUE, const char*, VALUE (*)(ANYARGS), int));
|
|
|
|
void rb_define_singleton_method _((VALUE, const char*, VALUE(*)(ANYARGS), int));
|
1998-01-16 15:19:09 +03:00
|
|
|
VALUE rb_singleton_class _((VALUE));
|
2002-11-22 12:14:24 +03:00
|
|
|
/* compar.c */
|
2003-05-19 19:45:46 +04:00
|
|
|
int rb_cmpint _((VALUE, VALUE, VALUE));
|
2003-05-08 07:56:12 +04:00
|
|
|
NORETURN(void rb_cmperr _((VALUE, VALUE)));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* enum.c */
|
|
|
|
/* error.c */
|
2003-03-04 17:12:19 +03:00
|
|
|
RUBY_EXTERN int ruby_nerrs;
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_exc_new _((VALUE, const char*, long));
|
|
|
|
VALUE rb_exc_new2 _((VALUE, const char*));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_exc_new3 _((VALUE, VALUE));
|
2001-01-10 10:30:18 +03:00
|
|
|
NORETURN(void rb_loaderror __((const char*, ...)));
|
2002-09-03 14:00:45 +04:00
|
|
|
NORETURN(void rb_name_error __((ID, const char*, ...)));
|
2002-01-04 17:15:33 +03:00
|
|
|
NORETURN(void rb_invalid_str _((const char*, const char*)));
|
1999-08-13 09:45:20 +04:00
|
|
|
void rb_compile_error __((const char*, ...));
|
|
|
|
void rb_compile_error_append __((const char*, ...));
|
2001-02-02 14:38:20 +03:00
|
|
|
NORETURN(void rb_load_fail _((char*)));
|
2001-01-10 10:30:18 +03:00
|
|
|
NORETURN(void rb_error_frozen _((char*)));
|
2002-09-03 14:00:45 +04:00
|
|
|
void rb_check_frozen _((VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* eval.c */
|
2003-03-04 17:12:19 +03:00
|
|
|
RUBY_EXTERN struct RNode *ruby_current_node;
|
2002-08-15 15:49:40 +04:00
|
|
|
void ruby_set_current_source _((void));
|
2001-01-10 10:30:18 +03:00
|
|
|
NORETURN(void rb_exc_raise _((VALUE)));
|
|
|
|
NORETURN(void rb_exc_fatal _((VALUE)));
|
2002-12-10 09:23:44 +03:00
|
|
|
VALUE rb_f_exit _((int,VALUE*));
|
|
|
|
VALUE rb_f_abort _((int,VALUE*));
|
1999-08-13 09:45:20 +04:00
|
|
|
void rb_remove_method _((VALUE, const char*));
|
|
|
|
void rb_disable_super _((VALUE, const char*));
|
|
|
|
void rb_enable_super _((VALUE, const char*));
|
2003-02-09 09:16:08 +03:00
|
|
|
#define HAVE_RB_DEFINE_ALLOC_FUNC 1
|
2002-12-20 11:33:17 +03:00
|
|
|
void rb_define_alloc_func _((VALUE, VALUE (*)(VALUE)));
|
|
|
|
void rb_undef_alloc_func _((VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
void rb_clear_cache _((void));
|
2003-07-07 12:28:19 +04:00
|
|
|
void rb_clear_cache_by_class _((VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
void rb_alias _((VALUE, ID, ID));
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_attr _((VALUE,ID,int,int,int));
|
1998-01-16 15:19:09 +03:00
|
|
|
int rb_method_boundp _((VALUE, ID, int));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_dvar_defined _((ID));
|
2000-02-01 06:12:21 +03:00
|
|
|
VALUE rb_dvar_curr _((ID));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_dvar_ref _((ID));
|
|
|
|
void rb_dvar_asgn _((ID, VALUE));
|
|
|
|
void rb_dvar_push _((ID, VALUE));
|
2001-09-20 10:23:50 +04:00
|
|
|
VALUE *rb_svar _((int));
|
2001-11-13 11:19:52 +03:00
|
|
|
VALUE rb_eval_cmd _((VALUE, VALUE, int));
|
1998-01-16 15:19:09 +03:00
|
|
|
int rb_respond_to _((VALUE, ID));
|
|
|
|
void rb_interrupt _((void));
|
|
|
|
VALUE rb_apply _((VALUE, ID, VALUE));
|
|
|
|
void rb_backtrace _((void));
|
|
|
|
ID rb_frame_last_func _((void));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_obj_instance_eval _((int, VALUE*, VALUE));
|
2001-10-10 12:21:13 +04:00
|
|
|
VALUE rb_mod_module_eval _((int, VALUE*, VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_load _((VALUE, int));
|
|
|
|
void rb_load_protect _((VALUE, int, int*));
|
2001-01-10 10:30:18 +03:00
|
|
|
NORETURN(void rb_jump_tag _((int)));
|
2000-09-22 22:15:52 +04:00
|
|
|
int rb_provided _((const char*));
|
1999-08-13 09:45:20 +04:00
|
|
|
void rb_provide _((const char*));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_f_require _((VALUE, VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
void rb_obj_call_init _((VALUE, int, VALUE*));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_class_new_instance _((int, VALUE*, VALUE));
|
2003-06-16 11:14:50 +04:00
|
|
|
VALUE rb_block_proc _((void));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_f_lambda _((void));
|
2002-04-26 04:40:28 +04:00
|
|
|
VALUE rb_proc_new _((VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE));
|
2001-05-02 08:22:21 +04:00
|
|
|
VALUE rb_protect _((VALUE (*)(VALUE), VALUE, int*));
|
2001-05-06 19:06:00 +04:00
|
|
|
void rb_set_end_proc _((void (*)(VALUE), VALUE));
|
1999-11-26 12:07:26 +03:00
|
|
|
void rb_mark_end_proc _((void));
|
2000-12-06 08:29:05 +03:00
|
|
|
void rb_exec_end_proc _((void));
|
2000-11-27 12:23:38 +03:00
|
|
|
void ruby_finalize _((void));
|
|
|
|
void ruby_stop _((int));
|
2002-10-29 22:11:17 +03:00
|
|
|
int ruby_cleanup _((int));
|
|
|
|
int ruby_exec _((void));
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_gc_mark_threads _((void));
|
|
|
|
void rb_thread_start_timer _((void));
|
|
|
|
void rb_thread_stop_timer _((void));
|
|
|
|
void rb_thread_schedule _((void));
|
|
|
|
void rb_thread_wait_fd _((int));
|
1999-08-13 09:45:20 +04:00
|
|
|
int rb_thread_fd_writable _((int));
|
|
|
|
void rb_thread_fd_close _((int));
|
1999-01-20 07:59:39 +03:00
|
|
|
int rb_thread_alone _((void));
|
2000-05-17 08:38:19 +04:00
|
|
|
void rb_thread_polling _((void));
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_thread_sleep _((int));
|
|
|
|
void rb_thread_sleep_forever _((void));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_thread_stop _((void));
|
|
|
|
VALUE rb_thread_wakeup _((VALUE));
|
|
|
|
VALUE rb_thread_run _((VALUE));
|
2003-03-07 08:59:42 +03:00
|
|
|
VALUE rb_thread_kill _((VALUE));
|
2001-05-02 08:22:21 +04:00
|
|
|
VALUE rb_thread_create _((VALUE (*)(ANYARGS), void*));
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_thread_interrupt _((void));
|
|
|
|
void rb_thread_trap_eval _((VALUE, int));
|
1999-08-13 09:45:20 +04:00
|
|
|
void rb_thread_signal_raise _((char*));
|
2001-05-02 08:22:21 +04:00
|
|
|
int rb_thread_select(ANYARGS);
|
|
|
|
void rb_thread_wait_for(ANYARGS);
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_thread_current _((void));
|
|
|
|
VALUE rb_thread_main _((void));
|
|
|
|
VALUE rb_thread_local_aref _((VALUE, ID));
|
|
|
|
VALUE rb_thread_local_aset _((VALUE, ID, VALUE));
|
2000-11-27 12:23:38 +03:00
|
|
|
void rb_thread_atfork _((void));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* file.c */
|
1999-08-13 09:45:20 +04:00
|
|
|
int eaccess _((const char*, int));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_file_s_expand_path _((int, VALUE *));
|
1999-08-13 09:45:20 +04:00
|
|
|
void rb_file_const _((const char*, VALUE));
|
2001-09-06 02:31:07 +04:00
|
|
|
int rb_find_file_ext _((VALUE*, const char* const*));
|
2001-07-14 19:17:19 +04:00
|
|
|
VALUE rb_find_file _((VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* gc.c */
|
2002-04-24 08:54:16 +04:00
|
|
|
NORETURN(void rb_memerror __((void)));
|
2001-11-21 18:42:12 +03:00
|
|
|
int ruby_stack_check _((void));
|
2001-11-19 08:03:03 +03:00
|
|
|
int ruby_stack_length _((VALUE**));
|
2002-04-18 12:46:18 +04:00
|
|
|
char *rb_source_filename _((const char*));
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_gc_mark_locations _((VALUE*, VALUE*));
|
|
|
|
void rb_mark_tbl _((struct st_table*));
|
|
|
|
void rb_mark_hash _((struct st_table*));
|
2001-03-19 06:20:24 +03:00
|
|
|
void rb_gc_mark_maybe _((VALUE));
|
|
|
|
void rb_gc_mark _((VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_gc_force_recycle _((VALUE));
|
|
|
|
void rb_gc _((void));
|
2002-12-04 10:39:32 +03:00
|
|
|
void rb_gc_copy_finalizer _((VALUE,VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_gc_call_finalizer_at_exit _((void));
|
* intern.h: add prototypes.
rb_gc_enable(), rb_gc_disable(), rb_gc_start(), rb_str_new5()
rb_str_buf_append(), rb_str_buf_cat(), rb_str_buf_cat2(),
rb_str_dup_frozen()
* ruby.h: added declaration.
rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo
* rubyio.h: changed double include guard macro to RUBYIO_H.
* array.c (inspect_call): make static.
* eval.c (dvar_asgn): ditto.
* io.c (rb_io_close_read): ditto.
* lex.c (rb_reserved_word): ditto.
* ruby.c: (req_list_head, req_list_last): ditto.
* ruby.c (require_libraries): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-17 10:52:35 +03:00
|
|
|
VALUE rb_gc_enable _((void));
|
|
|
|
VALUE rb_gc_disable _((void));
|
|
|
|
VALUE rb_gc_start _((void));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* hash.c */
|
|
|
|
VALUE rb_hash _((VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_hash_new _((void));
|
|
|
|
VALUE rb_hash_freeze _((VALUE));
|
|
|
|
VALUE rb_hash_aref _((VALUE, VALUE));
|
|
|
|
VALUE rb_hash_aset _((VALUE, VALUE, VALUE));
|
2000-07-04 11:04:42 +04:00
|
|
|
VALUE rb_hash_delete_if _((VALUE));
|
2001-07-24 13:07:33 +04:00
|
|
|
VALUE rb_hash_delete _((VALUE,VALUE));
|
2002-04-18 12:46:18 +04:00
|
|
|
int rb_path_check _((char*));
|
1999-01-20 07:59:39 +03:00
|
|
|
int rb_env_path_tainted _((void));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* io.c */
|
2003-07-29 11:52:55 +04:00
|
|
|
#define rb_defout rb_stdout
|
2003-03-04 17:12:19 +03:00
|
|
|
RUBY_EXTERN VALUE rb_fs;
|
|
|
|
RUBY_EXTERN VALUE rb_output_fs;
|
|
|
|
RUBY_EXTERN VALUE rb_rs;
|
|
|
|
RUBY_EXTERN VALUE rb_default_rs;
|
|
|
|
RUBY_EXTERN VALUE rb_output_rs;
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_io_write _((VALUE, VALUE));
|
|
|
|
VALUE rb_io_gets _((VALUE));
|
|
|
|
VALUE rb_io_getc _((VALUE));
|
|
|
|
VALUE rb_io_ungetc _((VALUE, VALUE));
|
|
|
|
VALUE rb_io_close _((VALUE));
|
|
|
|
VALUE rb_io_eof _((VALUE));
|
|
|
|
VALUE rb_io_binmode _((VALUE));
|
2002-02-20 09:35:37 +03:00
|
|
|
VALUE rb_io_addstr _((VALUE, VALUE));
|
|
|
|
VALUE rb_io_printf _((int, VALUE*, VALUE));
|
|
|
|
VALUE rb_io_print _((int, VALUE*, VALUE));
|
|
|
|
VALUE rb_io_puts _((int, VALUE*, VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_file_open _((const char*, const char*));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_gets _((void));
|
2003-07-31 12:42:44 +04:00
|
|
|
void rb_write_error _((const char*));
|
|
|
|
void rb_write_error2 _((const char*, long));
|
2001-07-03 11:29:00 +04:00
|
|
|
/* marshal.c */
|
|
|
|
VALUE rb_marshal_dump _((VALUE, VALUE));
|
|
|
|
VALUE rb_marshal_load _((VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* numeric.c */
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_num_zerodiv _((void));
|
|
|
|
VALUE rb_num_coerce_bin _((VALUE, VALUE));
|
2002-12-19 12:20:20 +03:00
|
|
|
VALUE rb_num_coerce_cmp _((VALUE, VALUE));
|
2003-07-31 12:42:44 +04:00
|
|
|
VALUE rb_num_coerce_relop _((VALUE, VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_float_new _((double));
|
|
|
|
VALUE rb_num2fix _((VALUE));
|
|
|
|
VALUE rb_fix2str _((VALUE, int));
|
2002-08-19 09:56:09 +04:00
|
|
|
VALUE rb_dbl_cmp _((double, double));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* object.c */
|
|
|
|
int rb_eql _((VALUE, VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_any_to_s _((VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
VALUE rb_inspect _((VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_obj_is_instance_of _((VALUE, VALUE));
|
|
|
|
VALUE rb_obj_is_kind_of _((VALUE, VALUE));
|
|
|
|
VALUE rb_obj_alloc _((VALUE));
|
|
|
|
VALUE rb_obj_clone _((VALUE));
|
2000-07-17 13:38:10 +04:00
|
|
|
VALUE rb_obj_dup _((VALUE));
|
2003-07-15 11:35:14 +04:00
|
|
|
VALUE rb_obj_init_copy _((VALUE,VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_obj_taint _((VALUE));
|
|
|
|
VALUE rb_obj_tainted _((VALUE));
|
|
|
|
VALUE rb_obj_untaint _((VALUE));
|
2000-05-12 13:07:57 +04:00
|
|
|
VALUE rb_obj_freeze _((VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_obj_id _((VALUE));
|
2001-08-20 08:29:58 +04:00
|
|
|
VALUE rb_obj_class _((VALUE));
|
2001-07-14 19:17:19 +04:00
|
|
|
VALUE rb_class_real _((VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_convert_type _((VALUE,int,const char*,const char*));
|
2001-11-29 18:57:25 +03:00
|
|
|
VALUE rb_check_convert_type _((VALUE,int,const char*,const char*));
|
2000-11-13 08:39:35 +03:00
|
|
|
VALUE rb_to_int _((VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
VALUE rb_Integer _((VALUE));
|
|
|
|
VALUE rb_Float _((VALUE));
|
|
|
|
VALUE rb_String _((VALUE));
|
|
|
|
VALUE rb_Array _((VALUE));
|
2002-04-18 12:46:18 +04:00
|
|
|
double rb_cstr_to_dbl _((const char*, int));
|
2002-02-01 13:23:22 +03:00
|
|
|
double rb_str_to_dbl _((VALUE, int));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* parse.y */
|
2003-03-04 17:12:19 +03:00
|
|
|
RUBY_EXTERN int ruby_sourceline;
|
|
|
|
RUBY_EXTERN char *ruby_sourcefile;
|
2002-09-23 19:48:42 +04:00
|
|
|
int ruby_yyparse _((void));
|
1999-01-20 07:59:39 +03:00
|
|
|
ID rb_id_attrset _((ID));
|
|
|
|
void rb_parser_append_print _((void));
|
|
|
|
void rb_parser_while_loop _((int, int));
|
2002-09-02 16:19:30 +04:00
|
|
|
int ruby_parser_stack_on_heap _((void));
|
2002-09-06 00:00:52 +04:00
|
|
|
void rb_gc_mark_parser _((void));
|
1999-12-14 09:50:43 +03:00
|
|
|
int rb_is_const_id _((ID));
|
1998-01-16 15:19:09 +03:00
|
|
|
int rb_is_instance_id _((ID));
|
2000-05-12 13:07:57 +04:00
|
|
|
int rb_is_class_id _((ID));
|
2001-09-20 10:23:50 +04:00
|
|
|
int rb_is_local_id _((ID));
|
2002-10-23 14:17:30 +04:00
|
|
|
int rb_is_junk_id _((ID));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_backref_get _((void));
|
|
|
|
void rb_backref_set _((VALUE));
|
|
|
|
VALUE rb_lastline_get _((void));
|
|
|
|
void rb_lastline_set _((VALUE));
|
2001-05-02 08:22:21 +04:00
|
|
|
VALUE rb_sym_all_symbols _((void));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* process.c */
|
1999-08-13 09:45:20 +04:00
|
|
|
int rb_proc_exec _((const char*));
|
2001-11-19 08:03:03 +03:00
|
|
|
VALUE rb_f_exec _((int,VALUE*));
|
2001-08-06 07:05:23 +04:00
|
|
|
int rb_waitpid _((int,int*,int));
|
1998-01-16 15:19:09 +03:00
|
|
|
void rb_syswait _((int));
|
2001-02-16 10:53:21 +03:00
|
|
|
VALUE rb_proc_times _((VALUE));
|
2003-07-26 06:26:08 +04:00
|
|
|
VALUE rb_detach_process _((int));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* range.c */
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_range_new _((VALUE, VALUE, int));
|
|
|
|
VALUE rb_range_beg_len _((VALUE, long*, long*, long, int));
|
1999-12-07 12:25:55 +03:00
|
|
|
VALUE rb_length_by_each _((VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* re.c */
|
2000-11-20 10:31:55 +03:00
|
|
|
int rb_memcmp _((char*,char*,long));
|
2001-07-24 13:07:33 +04:00
|
|
|
int rb_memcicmp _((char*,char*,long));
|
2003-02-07 09:35:26 +03:00
|
|
|
long rb_memsearch _((char*,long,char*,long));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_reg_nth_defined _((int, VALUE));
|
|
|
|
VALUE rb_reg_nth_match _((int, VALUE));
|
|
|
|
VALUE rb_reg_last_match _((VALUE));
|
|
|
|
VALUE rb_reg_match_pre _((VALUE));
|
|
|
|
VALUE rb_reg_match_post _((VALUE));
|
|
|
|
VALUE rb_reg_match_last _((VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_reg_new _((const char*, long, int));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_reg_match _((VALUE, VALUE));
|
|
|
|
VALUE rb_reg_match2 _((VALUE));
|
|
|
|
int rb_reg_options _((VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
void rb_set_kcode _((const char*));
|
2000-02-08 11:54:01 +03:00
|
|
|
const char* rb_get_kcode _((void));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* ruby.c */
|
2003-03-04 17:12:19 +03:00
|
|
|
RUBY_EXTERN VALUE rb_argv;
|
|
|
|
RUBY_EXTERN VALUE rb_argv0;
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_load_file _((char*));
|
|
|
|
void ruby_script _((char*));
|
1998-01-16 15:19:09 +03:00
|
|
|
void ruby_prog_init _((void));
|
1999-01-20 07:59:39 +03:00
|
|
|
void ruby_set_argv _((int, char**));
|
|
|
|
void ruby_process_options _((int, char**));
|
|
|
|
void ruby_load_script _((void));
|
2000-08-02 13:22:27 +04:00
|
|
|
void ruby_init_loadpath _((void));
|
|
|
|
void ruby_incpush _((const char*));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* signal.c */
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_f_kill _((int, VALUE*));
|
|
|
|
void rb_gc_mark_trap_list _((void));
|
|
|
|
#ifdef POSIX_SIGNAL
|
|
|
|
#define posix_signal ruby_posix_signal
|
2001-05-02 08:22:21 +04:00
|
|
|
void posix_signal _((int, RETSIGTYPE (*)(int)));
|
1999-01-20 07:59:39 +03:00
|
|
|
#endif
|
1998-01-16 15:19:09 +03:00
|
|
|
void rb_trap_exit _((void));
|
|
|
|
void rb_trap_exec _((void));
|
|
|
|
/* sprintf.c */
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_f_sprintf _((int, VALUE*));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* string.c */
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_str_new _((const char*, long));
|
|
|
|
VALUE rb_str_new2 _((const char*));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_str_new3 _((VALUE));
|
|
|
|
VALUE rb_str_new4 _((VALUE));
|
2002-04-18 12:46:18 +04:00
|
|
|
VALUE rb_str_new5 _((VALUE, const char*, long));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_tainted_str_new _((const char*, long));
|
|
|
|
VALUE rb_tainted_str_new2 _((const char*));
|
2001-05-30 13:12:34 +04:00
|
|
|
VALUE rb_str_buf_new _((long));
|
|
|
|
VALUE rb_str_buf_new2 _((const char*));
|
* intern.h: add prototypes.
rb_gc_enable(), rb_gc_disable(), rb_gc_start(), rb_str_new5()
rb_str_buf_append(), rb_str_buf_cat(), rb_str_buf_cat2(),
rb_str_dup_frozen()
* ruby.h: added declaration.
rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo
* rubyio.h: changed double include guard macro to RUBYIO_H.
* array.c (inspect_call): make static.
* eval.c (dvar_asgn): ditto.
* io.c (rb_io_close_read): ditto.
* lex.c (rb_reserved_word): ditto.
* ruby.c: (req_list_head, req_list_last): ditto.
* ruby.c (require_libraries): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-17 10:52:35 +03:00
|
|
|
VALUE rb_str_buf_append _((VALUE, VALUE));
|
2002-04-18 12:46:18 +04:00
|
|
|
VALUE rb_str_buf_cat _((VALUE, const char*, long));
|
|
|
|
VALUE rb_str_buf_cat2 _((VALUE, const char*));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_obj_as_string _((VALUE));
|
2002-12-19 12:20:20 +03:00
|
|
|
VALUE rb_check_string_type _((VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_str_dup _((VALUE));
|
* intern.h: add prototypes.
rb_gc_enable(), rb_gc_disable(), rb_gc_start(), rb_str_new5()
rb_str_buf_append(), rb_str_buf_cat(), rb_str_buf_cat2(),
rb_str_dup_frozen()
* ruby.h: added declaration.
rb_defout, rb_stdin, rb_stdout, rb_stderr, ruby_errinfo
* rubyio.h: changed double include guard macro to RUBYIO_H.
* array.c (inspect_call): make static.
* eval.c (dvar_asgn): ditto.
* io.c (rb_io_close_read): ditto.
* lex.c (rb_reserved_word): ditto.
* ruby.c: (req_list_head, req_list_last): ditto.
* ruby.c (require_libraries): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-12-17 10:52:35 +03:00
|
|
|
VALUE rb_str_dup_frozen _((VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_str_plus _((VALUE, VALUE));
|
|
|
|
VALUE rb_str_times _((VALUE, VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_str_substr _((VALUE, long, long));
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_str_modify _((VALUE));
|
|
|
|
VALUE rb_str_freeze _((VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_str_resize _((VALUE, long));
|
|
|
|
VALUE rb_str_cat _((VALUE, const char*, long));
|
2000-04-10 09:48:43 +04:00
|
|
|
VALUE rb_str_cat2 _((VALUE, const char*));
|
|
|
|
VALUE rb_str_append _((VALUE, VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_str_concat _((VALUE, VALUE));
|
|
|
|
int rb_str_hash _((VALUE));
|
|
|
|
int rb_str_cmp _((VALUE, VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_str_upto _((VALUE, VALUE, int));
|
2001-05-16 13:05:54 +04:00
|
|
|
void rb_str_update _((VALUE, long, long, VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_str_inspect _((VALUE));
|
2002-10-23 14:17:30 +04:00
|
|
|
VALUE rb_str_dump _((VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_str_split _((VALUE, const char*));
|
2000-03-17 11:58:21 +03:00
|
|
|
void rb_str_associate _((VALUE, VALUE));
|
2001-01-15 10:01:00 +03:00
|
|
|
VALUE rb_str_associated _((VALUE));
|
2000-08-25 12:26:06 +04:00
|
|
|
void rb_str_setter _((VALUE, ID, VALUE*));
|
2002-10-23 14:17:30 +04:00
|
|
|
VALUE rb_str_intern _((VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* struct.c */
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_struct_new __((VALUE, ...));
|
1999-08-13 09:45:20 +04:00
|
|
|
VALUE rb_struct_define __((const char*, ...));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_struct_alloc _((VALUE, VALUE));
|
|
|
|
VALUE rb_struct_aref _((VALUE, VALUE));
|
|
|
|
VALUE rb_struct_aset _((VALUE, VALUE, VALUE));
|
|
|
|
VALUE rb_struct_getmember _((VALUE, ID));
|
2001-08-29 10:28:51 +04:00
|
|
|
VALUE rb_struct_iv_get _((VALUE, char*));
|
1998-01-16 15:19:09 +03:00
|
|
|
/* time.c */
|
2001-05-02 08:22:21 +04:00
|
|
|
VALUE rb_time_new(ANYARGS);
|
1998-01-16 15:19:09 +03:00
|
|
|
/* variable.c */
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_mod_name _((VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
VALUE rb_class_path _((VALUE));
|
1999-08-13 09:45:20 +04:00
|
|
|
void rb_set_class_path _((VALUE, VALUE, const char*));
|
|
|
|
VALUE rb_path2class _((const char*));
|
1998-01-16 15:19:09 +03:00
|
|
|
void rb_name_class _((VALUE, ID));
|
* eval.c (ev_const_defined, ev_const_get), variable.c
(rb_const_get_at, rb_const_get, rb_mod_remove_const): use Qundef
as autoload marker. [ruby-dev:18103], [ruby-dev:18184]
* eval.c (rb_mod_autoload, rb_mod_autoload_p): new method;
Module#autoload, Module#autoload?.
* variable.c (rb_autoload, rb_autoload_load, rb_autoload_p):
manage autoload constants per classes/modules.
* variable.c (rb_const_defined_at, rb_const_defined): return false
for autoloading constants.
* class.c (rb_define_class, rb_define_module), eval.c (rb_eval),
variable.c (rb_mod_const_at, rb_const_assign): removed autoload
stuff.
* intern.h: prototypes; rb_autoload, rb_autoload_load,
rb_autoload_p.
* lib/optparse.rb (OptionParser::Switch::PlacedArgument::parse):
do not treat unmatched argument as an option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-05-29 04:11:11 +04:00
|
|
|
void rb_autoload _((VALUE, ID, const char*));
|
|
|
|
void rb_autoload_load _((VALUE, ID));
|
|
|
|
VALUE rb_autoload_p _((VALUE, ID));
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_gc_mark_global_tbl _((void));
|
|
|
|
VALUE rb_f_trace_var _((int, VALUE*));
|
|
|
|
VALUE rb_f_untrace_var _((int, VALUE*));
|
|
|
|
VALUE rb_f_global_variables _((void));
|
1998-01-16 15:19:09 +03:00
|
|
|
void rb_alias_variable _((ID, ID));
|
2000-01-05 07:41:21 +03:00
|
|
|
struct st_table* rb_generic_ivar_table _((VALUE));
|
2001-07-14 19:17:19 +04:00
|
|
|
void rb_copy_generic_ivar _((VALUE,VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
void rb_mark_generic_ivar _((VALUE));
|
|
|
|
void rb_mark_generic_ivar_tbl _((void));
|
|
|
|
void rb_free_generic_ivar _((VALUE));
|
1998-01-16 15:19:09 +03:00
|
|
|
VALUE rb_ivar_get _((VALUE, ID));
|
|
|
|
VALUE rb_ivar_set _((VALUE, ID, VALUE));
|
|
|
|
VALUE rb_ivar_defined _((VALUE, ID));
|
2002-04-18 12:46:18 +04:00
|
|
|
VALUE rb_iv_set _((VALUE, const char*, VALUE));
|
|
|
|
VALUE rb_iv_get _((VALUE, const char*));
|
2003-02-18 17:30:17 +03:00
|
|
|
VALUE rb_attr_get _((VALUE, ID));
|
1999-01-20 07:59:39 +03:00
|
|
|
VALUE rb_obj_instance_variables _((VALUE));
|
|
|
|
VALUE rb_obj_remove_instance_variable _((VALUE, VALUE));
|
2001-06-05 11:19:39 +04:00
|
|
|
void *rb_mod_const_at _((VALUE, void*));
|
|
|
|
void *rb_mod_const_of _((VALUE, void*));
|
|
|
|
VALUE rb_const_list _((void*));
|
1999-12-14 09:50:43 +03:00
|
|
|
VALUE rb_mod_constants _((VALUE));
|
|
|
|
VALUE rb_mod_remove_const _((VALUE, VALUE));
|
|
|
|
int rb_const_defined _((VALUE, ID));
|
2003-06-20 11:11:44 +04:00
|
|
|
int rb_const_defined_at _((VALUE, ID));
|
|
|
|
int rb_const_defined_from _((VALUE, ID));
|
1999-12-14 09:50:43 +03:00
|
|
|
VALUE rb_const_get _((VALUE, ID));
|
|
|
|
VALUE rb_const_get_at _((VALUE, ID));
|
2003-06-20 11:11:44 +04:00
|
|
|
VALUE rb_const_get_from _((VALUE, ID));
|
1999-12-14 09:50:43 +03:00
|
|
|
void rb_const_set _((VALUE, ID, VALUE));
|
|
|
|
VALUE rb_mod_constants _((VALUE));
|
2003-07-22 12:42:47 +04:00
|
|
|
VALUE rb_mod_const_missing _((VALUE,VALUE));
|
2000-12-08 10:10:38 +03:00
|
|
|
VALUE rb_cvar_defined _((VALUE, ID));
|
2003-02-09 09:16:08 +03:00
|
|
|
#define RB_CVAR_SET_4ARGS 1
|
2002-02-15 09:14:26 +03:00
|
|
|
void rb_cvar_set _((VALUE, ID, VALUE, int));
|
2000-08-28 13:53:42 +04:00
|
|
|
VALUE rb_cvar_get _((VALUE, ID));
|
2002-04-18 12:46:18 +04:00
|
|
|
void rb_cv_set _((VALUE, const char*, VALUE));
|
|
|
|
VALUE rb_cv_get _((VALUE, const char*));
|
|
|
|
void rb_define_class_variable _((VALUE, const char*, VALUE));
|
2000-09-15 10:00:30 +04:00
|
|
|
VALUE rb_mod_class_variables _((VALUE));
|
2000-12-08 10:10:38 +03:00
|
|
|
VALUE rb_mod_remove_cvar _((VALUE, VALUE));
|
1999-01-20 07:59:39 +03:00
|
|
|
/* version.c */
|
|
|
|
void ruby_show_version _((void));
|
|
|
|
void ruby_show_copyright _((void));
|