2011-05-18 09:41:54 -04:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
internal.h -
|
|
|
|
|
|
|
|
$Author$
|
|
|
|
created at: Tue May 17 11:42:20 JST 2011
|
|
|
|
|
|
|
|
Copyright (C) 2011 Yukihiro Matsumoto
|
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
#ifndef RUBY_INTERNAL_H
|
|
|
|
#define RUBY_INTERNAL_H 1
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#if 0
|
|
|
|
} /* satisfy cc-mode */
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2011-06-17 23:05:11 -04:00
|
|
|
struct rb_deprecated_classext_struct {
|
|
|
|
char conflict[sizeof(VALUE) * 3];
|
|
|
|
};
|
|
|
|
|
2011-05-18 09:41:54 -04:00
|
|
|
struct rb_classext_struct {
|
|
|
|
VALUE super;
|
|
|
|
struct st_table *iv_tbl;
|
|
|
|
struct st_table *const_tbl;
|
|
|
|
};
|
|
|
|
|
2011-06-17 23:05:11 -04:00
|
|
|
#undef RCLASS_SUPER
|
|
|
|
#define RCLASS_EXT(c) (RCLASS(c)->ptr)
|
|
|
|
#define RCLASS_SUPER(c) (RCLASS_EXT(c)->super)
|
|
|
|
#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
|
|
|
|
#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
|
|
|
|
#define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
|
|
|
|
#define RCLASS_IV_INDEX_TBL(c) (RCLASS(c)->iv_index_tbl)
|
|
|
|
|
* internal.h: declare more internal functions.
* iseq.h (rb_method_get_iseq): declared.
* compile.c, eval.c, eval_error.c, iseq.c, parse.y, proc.c, range.c,
ruby.c, time.c, util.c, vm.c: don't declare internal functions.
* eval.c, parse.y, thread_pthread.c: non-existing function declarations
removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 21:54:57 -04:00
|
|
|
struct vtm; /* defined by timev.h */
|
|
|
|
|
2011-06-18 04:26:19 -04:00
|
|
|
/* array.c */
|
|
|
|
VALUE rb_ary_last(int, VALUE *, VALUE);
|
2011-07-29 10:53:51 -04:00
|
|
|
void rb_ary_set_len(VALUE, long);
|
2012-03-08 10:25:04 -05:00
|
|
|
VALUE rb_ary_cat(VALUE, const VALUE *, long);
|
2011-06-18 04:26:19 -04:00
|
|
|
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
/* bignum.c */
|
|
|
|
VALUE rb_big_fdiv(VALUE x, VALUE y);
|
2011-05-29 02:09:08 -04:00
|
|
|
VALUE rb_big_uminus(VALUE x);
|
|
|
|
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
/* class.c */
|
|
|
|
VALUE rb_obj_methods(int argc, VALUE *argv, VALUE obj);
|
|
|
|
VALUE rb_obj_protected_methods(int argc, VALUE *argv, VALUE obj);
|
|
|
|
VALUE rb_obj_private_methods(int argc, VALUE *argv, VALUE obj);
|
|
|
|
VALUE rb_obj_public_methods(int argc, VALUE *argv, VALUE obj);
|
* method.h, internal.h iseq.h: declare internal functions.
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c,
thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't
declare internal functions.
Note that rb_method_entry_eq() is defined in vm_method.c but
there was a declaration in proc.c with different const-ness.
Now it is declared in method.h with same const-ness to the
definition.
* object.c (rb_mod_module_exec): don't declare functions declared in
include/ruby/intern.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 23:49:33 -04:00
|
|
|
int rb_obj_basic_to_s_p(VALUE);
|
2011-06-18 00:41:53 -04:00
|
|
|
void Init_class_hierarchy(void);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
|
|
|
|
/* compile.c */
|
|
|
|
int rb_dvar_defined(ID);
|
|
|
|
int rb_local_defined(ID);
|
|
|
|
int rb_parse_in_eval(void);
|
|
|
|
int rb_parse_in_main(void);
|
* internal.h: declare more internal functions.
* iseq.h (rb_method_get_iseq): declared.
* compile.c, eval.c, eval_error.c, iseq.c, parse.y, proc.c, range.c,
ruby.c, time.c, util.c, vm.c: don't declare internal functions.
* eval.c, parse.y, thread_pthread.c: non-existing function declarations
removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 21:54:57 -04:00
|
|
|
VALUE rb_insns_name_array(void);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
|
2012-02-15 09:00:11 -05:00
|
|
|
/* cont.c */
|
|
|
|
VALUE rb_obj_is_fiber(VALUE);
|
|
|
|
void rb_fiber_reset_root_local_storage(VALUE);
|
|
|
|
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
/* debug.c */
|
|
|
|
PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
|
|
|
|
|
|
|
|
/* dmyext.c */
|
|
|
|
void Init_ext(void);
|
|
|
|
|
|
|
|
/* encoding.c */
|
|
|
|
ID rb_id_encoding(void);
|
|
|
|
|
|
|
|
/* encoding.c */
|
|
|
|
void rb_gc_mark_encodings(void);
|
|
|
|
|
* internal.h: declare more internal functions.
* iseq.h (rb_method_get_iseq): declared.
* compile.c, eval.c, eval_error.c, iseq.c, parse.y, proc.c, range.c,
ruby.c, time.c, util.c, vm.c: don't declare internal functions.
* eval.c, parse.y, thread_pthread.c: non-existing function declarations
removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 21:54:57 -04:00
|
|
|
/* error.c */
|
|
|
|
NORETURN(PRINTF_ARGS(void rb_compile_bug(const char*, int, const char*, ...), 3, 4));
|
|
|
|
VALUE rb_check_backtrace(VALUE);
|
2011-06-28 17:17:29 -04:00
|
|
|
NORETURN(void rb_async_bug_errno(const char *,int));
|
* internal.h: declare more internal functions.
* iseq.h (rb_method_get_iseq): declared.
* compile.c, eval.c, eval_error.c, iseq.c, parse.y, proc.c, range.c,
ruby.c, time.c, util.c, vm.c: don't declare internal functions.
* eval.c, parse.y, thread_pthread.c: non-existing function declarations
removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 21:54:57 -04:00
|
|
|
|
* method.h, internal.h iseq.h: declare internal functions.
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c,
thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't
declare internal functions.
Note that rb_method_entry_eq() is defined in vm_method.c but
there was a declaration in proc.c with different const-ness.
Now it is declared in method.h with same const-ness to the
definition.
* object.c (rb_mod_module_exec): don't declare functions declared in
include/ruby/intern.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 23:49:33 -04:00
|
|
|
/* eval_error.c */
|
|
|
|
void ruby_error_print(void);
|
|
|
|
VALUE rb_get_backtrace(VALUE info);
|
|
|
|
|
|
|
|
/* eval_jump.c */
|
|
|
|
void rb_call_end_proc(VALUE data);
|
|
|
|
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
/* file.c */
|
|
|
|
VALUE rb_home_dir(const char *user, VALUE result);
|
|
|
|
VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
|
2012-03-01 02:13:22 -05:00
|
|
|
void rb_file_const(const char*, VALUE);
|
|
|
|
int rb_file_load_ok(const char *);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
void Init_File(void);
|
|
|
|
|
|
|
|
/* gc.c */
|
|
|
|
void Init_heap(void);
|
2012-01-09 22:49:10 -05:00
|
|
|
void *ruby_mimmalloc(size_t size);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
|
|
|
|
/* inits.c */
|
|
|
|
void rb_call_inits(void);
|
|
|
|
|
|
|
|
/* io.c */
|
|
|
|
const char *ruby_get_inplace_mode(void);
|
|
|
|
void ruby_set_inplace_mode(const char *);
|
|
|
|
ssize_t rb_io_bufread(VALUE io, void *buf, size_t size);
|
|
|
|
void rb_stdio_set_default_encoding(void);
|
|
|
|
|
|
|
|
/* iseq.c */
|
|
|
|
VALUE rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE filepath, VALUE line, VALUE opt);
|
|
|
|
VALUE rb_iseq_clone(VALUE iseqval, VALUE newcbase);
|
|
|
|
|
|
|
|
/* load.c */
|
|
|
|
VALUE rb_get_load_path(void);
|
2012-03-07 02:30:31 -05:00
|
|
|
NORETURN(void rb_load_fail(VALUE, const char*));
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
|
|
|
|
/* math.c */
|
2011-07-09 06:50:51 -04:00
|
|
|
VALUE rb_math_atan2(VALUE, VALUE);
|
|
|
|
VALUE rb_math_cos(VALUE);
|
|
|
|
VALUE rb_math_cosh(VALUE);
|
|
|
|
VALUE rb_math_exp(VALUE);
|
|
|
|
VALUE rb_math_hypot(VALUE, VALUE);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
VALUE rb_math_log(int argc, VALUE *argv);
|
2011-07-09 06:50:51 -04:00
|
|
|
VALUE rb_math_sin(VALUE);
|
|
|
|
VALUE rb_math_sinh(VALUE);
|
|
|
|
VALUE rb_math_sqrt(VALUE);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
|
|
|
|
/* newline.c */
|
|
|
|
void Init_newline(void);
|
|
|
|
|
|
|
|
/* numeric.c */
|
|
|
|
int rb_num_to_uint(VALUE val, unsigned int *ret);
|
* internal.h: declare more internal functions.
* iseq.h (rb_method_get_iseq): declared.
* compile.c, eval.c, eval_error.c, iseq.c, parse.y, proc.c, range.c,
ruby.c, time.c, util.c, vm.c: don't declare internal functions.
* eval.c, parse.y, thread_pthread.c: non-existing function declarations
removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 21:54:57 -04:00
|
|
|
int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl);
|
2012-03-14 02:10:01 -04:00
|
|
|
double ruby_float_mod(double x, double y);
|
2011-06-09 10:45:56 -04:00
|
|
|
|
* method.h, internal.h iseq.h: declare internal functions.
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c,
thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't
declare internal functions.
Note that rb_method_entry_eq() is defined in vm_method.c but
there was a declaration in proc.c with different const-ness.
Now it is declared in method.h with same const-ness to the
definition.
* object.c (rb_mod_module_exec): don't declare functions declared in
include/ruby/intern.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 23:49:33 -04:00
|
|
|
/* object.c */
|
|
|
|
VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
|
|
|
|
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
/* parse.y */
|
|
|
|
VALUE rb_parser_get_yydebug(VALUE);
|
|
|
|
VALUE rb_parser_set_yydebug(VALUE, VALUE);
|
2011-07-22 08:06:42 -04:00
|
|
|
int rb_is_const_name(VALUE name);
|
|
|
|
int rb_is_class_name(VALUE name);
|
|
|
|
int rb_is_global_name(VALUE name);
|
|
|
|
int rb_is_instance_name(VALUE name);
|
|
|
|
int rb_is_attrset_name(VALUE name);
|
|
|
|
int rb_is_local_name(VALUE name);
|
|
|
|
int rb_is_method_name(VALUE name);
|
|
|
|
int rb_is_junk_name(VALUE name);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
|
2011-06-18 04:26:19 -04:00
|
|
|
/* proc.c */
|
|
|
|
VALUE rb_proc_location(VALUE self);
|
2012-02-20 19:13:44 -05:00
|
|
|
st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
|
2011-06-18 04:26:19 -04:00
|
|
|
|
2012-06-04 06:19:32 -04:00
|
|
|
/* process.c */
|
|
|
|
|
2012-06-04 07:01:41 -04:00
|
|
|
/* argv_str contains extra two elements.
|
|
|
|
* The beginning one is for /bin/sh used by exec_with_sh.
|
|
|
|
* The last one for terminating NULL used by execve.
|
2012-06-04 06:19:32 -04:00
|
|
|
* See rb_exec_fillarg() in process.c. */
|
2012-06-04 07:01:41 -04:00
|
|
|
#define ARGVSTR2ARGC(argv_str) (RSTRING_LEN(argv_str) / sizeof(char *) - 2)
|
|
|
|
#define ARGVSTR2ARGV(argv_str) ((char **)RSTRING_PTR(argv_str) + 1)
|
2012-06-04 06:19:32 -04:00
|
|
|
|
2012-06-10 07:21:07 -04:00
|
|
|
rb_pid_t rb_fork_ruby(int *status);
|
|
|
|
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
/* rational.c */
|
|
|
|
VALUE rb_lcm(VALUE x, VALUE y);
|
2011-07-09 07:06:43 -04:00
|
|
|
VALUE rb_rational_reciprocal(VALUE x);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
|
|
|
|
/* re.c */
|
|
|
|
VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
|
|
|
|
VALUE rb_reg_check_preprocess(VALUE);
|
|
|
|
|
|
|
|
/* signal.c */
|
|
|
|
int rb_get_next_signal(void);
|
|
|
|
|
2011-08-27 06:06:25 -04:00
|
|
|
/* strftime.c */
|
|
|
|
#ifdef RUBY_ENCODING_H
|
|
|
|
size_t rb_strftime_timespec(char *s, size_t maxsize, const char *format, rb_encoding *enc,
|
|
|
|
const struct vtm *vtm, struct timespec *ts, int gmt);
|
|
|
|
size_t rb_strftime(char *s, size_t maxsize, const char *format, rb_encoding *enc,
|
|
|
|
const struct vtm *vtm, VALUE timev, int gmt);
|
|
|
|
#endif
|
|
|
|
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
/* string.c */
|
|
|
|
int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
|
2012-06-09 10:36:17 -04:00
|
|
|
int rb_str_symname_p(VALUE);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
|
|
|
|
/* struct.c */
|
|
|
|
VALUE rb_struct_init_copy(VALUE copy, VALUE s);
|
|
|
|
|
|
|
|
/* time.c */
|
|
|
|
struct timeval rb_time_timeval(VALUE);
|
|
|
|
|
|
|
|
/* thread.c */
|
|
|
|
VALUE rb_obj_is_mutex(VALUE obj);
|
|
|
|
VALUE ruby_suppress_tracing(VALUE (*func)(VALUE, int), VALUE arg, int always);
|
2011-06-09 11:02:46 -04:00
|
|
|
void rb_thread_execute_interrupts(VALUE th);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
void rb_clear_trace_func(void);
|
* method.h, internal.h iseq.h: declare internal functions.
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c,
thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't
declare internal functions.
Note that rb_method_entry_eq() is defined in vm_method.c but
there was a declaration in proc.c with different const-ness.
Now it is declared in method.h with same const-ness to the
definition.
* object.c (rb_mod_module_exec): don't declare functions declared in
include/ruby/intern.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 23:49:33 -04:00
|
|
|
VALUE rb_get_coverages(void);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
|
|
|
|
/* thread_pthread.c, thread_win32.c */
|
|
|
|
void Init_native_thread(void);
|
|
|
|
|
|
|
|
/* vm.c */
|
|
|
|
VALUE rb_obj_is_thread(VALUE obj);
|
|
|
|
void rb_vm_mark(void *ptr);
|
|
|
|
void Init_BareVM(void);
|
|
|
|
VALUE rb_vm_top_self(void);
|
|
|
|
void rb_thread_recycle_stack_release(VALUE *);
|
|
|
|
void rb_vm_change_state(void);
|
|
|
|
void rb_vm_inc_const_missing_count(void);
|
|
|
|
void rb_thread_mark(void *th);
|
* method.h, internal.h iseq.h: declare internal functions.
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c,
thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't
declare internal functions.
Note that rb_method_entry_eq() is defined in vm_method.c but
there was a declaration in proc.c with different const-ness.
Now it is declared in method.h with same const-ness to the
definition.
* object.c (rb_mod_module_exec): don't declare functions declared in
include/ruby/intern.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 23:49:33 -04:00
|
|
|
const void **rb_vm_get_insns_address_table(void);
|
2011-09-03 11:11:53 -04:00
|
|
|
VALUE rb_sourcefilename(void);
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
|
|
|
|
/* vm_dump.c */
|
|
|
|
void rb_vm_bugreport(void);
|
|
|
|
|
|
|
|
/* vm_eval.c */
|
* method.h, internal.h iseq.h: declare internal functions.
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c,
thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't
declare internal functions.
Note that rb_method_entry_eq() is defined in vm_method.c but
there was a declaration in proc.c with different const-ness.
Now it is declared in method.h with same const-ness to the
definition.
* object.c (rb_mod_module_exec): don't declare functions declared in
include/ruby/intern.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 23:49:33 -04:00
|
|
|
void Init_vm_eval(void);
|
2011-06-18 04:26:19 -04:00
|
|
|
VALUE rb_current_realfilepath(void);
|
* method.h, internal.h iseq.h: declare internal functions.
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c,
thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't
declare internal functions.
Note that rb_method_entry_eq() is defined in vm_method.c but
there was a declaration in proc.c with different const-ness.
Now it is declared in method.h with same const-ness to the
definition.
* object.c (rb_mod_module_exec): don't declare functions declared in
include/ruby/intern.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 23:49:33 -04:00
|
|
|
|
|
|
|
/* vm_method.c */
|
|
|
|
void Init_eval_method(void);
|
2012-05-24 02:09:23 -04:00
|
|
|
int rb_method_defined_by(VALUE obj, ID mid, VALUE (*cfunc)(ANYARGS));
|
* internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.
* iseq.h: declare rb_iseq_t dependent internal functions here.
* vm_core.h: declare rb_thread_t dependent internal functions here.
* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
thread.c, time.c, transcode.c, variable.c, vm.c,
tool/compile_prelude.rb: don't declare internal functions declared
in above headers. include above headers if required.
Note that rb_thread_mark() was declared as
void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
void rb_thread_mark(void *ptr) in vm.c. Now it is declared as
the later in internal.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 18:43:38 -04:00
|
|
|
|
|
|
|
/* miniprelude.c, prelude.c */
|
|
|
|
void Init_prelude(void);
|
2011-06-09 11:02:46 -04:00
|
|
|
|
2012-06-02 11:59:37 -04:00
|
|
|
/* vm_backtrace.c */
|
|
|
|
void Init_vm_backtrace(void);
|
|
|
|
VALUE rb_thread_backtrace(VALUE thval);
|
|
|
|
VALUE rb_make_backtrace(void);
|
|
|
|
void rb_backtrace_print_as_bugreport(void);
|
|
|
|
int rb_backtrace_p(VALUE obj);
|
|
|
|
VALUE rb_backtrace_to_str_ary(VALUE obj);
|
|
|
|
VALUE rb_vm_backtrace_object();
|
|
|
|
|
2011-06-21 08:31:17 -04:00
|
|
|
#if defined __GNUC__ && __GNUC__ >= 4
|
|
|
|
#pragma GCC visibility push(default)
|
|
|
|
#endif
|
2011-06-30 04:37:06 -04:00
|
|
|
const char *rb_objspace_data_type_name(VALUE obj);
|
2011-07-10 01:19:47 -04:00
|
|
|
|
2011-07-10 08:52:03 -04:00
|
|
|
/* Temporary. This API will be removed (renamed). */
|
2011-07-10 01:19:47 -04:00
|
|
|
VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
|
|
|
|
|
2011-07-10 08:52:03 -04:00
|
|
|
/* experimental.
|
|
|
|
* These APIs can be changed on Ruby 1.9.4 or later.
|
|
|
|
* We will change these APIs (spac, name and so on) if there are something wrong.
|
|
|
|
* If you use these APIs, catch up future changes.
|
|
|
|
*/
|
2011-07-10 01:19:47 -04:00
|
|
|
void *rb_thread_call_with_gvl(void *(*func)(void *), void *data1);
|
|
|
|
VALUE rb_thread_call_without_gvl(
|
|
|
|
rb_blocking_function_t *func, void *data1,
|
|
|
|
rb_unblock_function_t *ubf, void *data2);
|
|
|
|
|
2011-10-31 23:37:01 -04:00
|
|
|
/* io.c */
|
|
|
|
void rb_maygvl_fd_fix_cloexec(int fd);
|
|
|
|
|
2012-06-09 21:29:58 -04:00
|
|
|
/* process.c */
|
|
|
|
int rb_exec_async_signal_safe(const struct rb_exec_arg *e, char *errmsg, size_t errmsg_buflen);
|
|
|
|
rb_pid_t rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen);
|
|
|
|
|
2011-06-21 08:31:17 -04:00
|
|
|
#if defined __GNUC__ && __GNUC__ >= 4
|
|
|
|
#pragma GCC visibility pop
|
|
|
|
#endif
|
|
|
|
|
2011-05-18 09:41:54 -04:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
#if 0
|
|
|
|
{ /* satisfy cc-mode */
|
|
|
|
#endif
|
|
|
|
} /* extern "C" { */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* RUBY_INTERNAL_H */
|