Permalink
Browse files

* 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
  • Loading branch information...
1 parent aba879a commit e7996eb3cc1687d1f70ea8f78befddf821ad3ff0 @akr akr committed Jun 17, 2011
Showing with 172 additions and 126 deletions.
  1. +23 −0 ChangeLog
  2. +1 −0 bignum.c
  3. +0 −2 class.c
  4. +1 −1 compile.c
  5. +1 −4 complex.c
  6. +1 −3 cont.c
  7. +1 −2 dir.c
  8. +1 −0 encoding.c
  9. +0 −2 enumerator.c
  10. +1 −2 error.c
  11. +1 −11 eval.c
  12. +1 −4 file.c
  13. +0 −6 gc.c
  14. +0 −2 hash.c
  15. +1 −0 inits.c
  16. +117 −2 internal.h
  17. +0 −4 io.c
  18. +1 −2 iseq.c
  19. +1 −0 iseq.h
  20. +1 −1 load.c
  21. +0 −2 marshal.c
  22. +1 −1 math.c
  23. +3 −0 node.h
  24. +0 −4 numeric.c
  25. +0 −5 object.c
  26. +1 −10 parse.y
  27. +1 −2 proc.c
  28. +1 −5 process.c
  29. +1 −2 range.c
  30. +1 −0 rational.c
  31. +1 −2 re.c
  32. +1 −18 ruby.c
  33. +1 −4 string.c
  34. +0 −9 thread.c
  35. +1 −0 time.c
  36. +1 −2 tool/compile_prelude.rb
  37. +1 −2 transcode.c
  38. +0 −3 variable.c
  39. +1 −7 vm.c
  40. +3 −0 vm_core.h
View
@@ -1,3 +1,26 @@
+Sat Jun 18 07:27:27 2011 Tanaka Akira <akr@fsij.org>
+
+ * 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.
+
Sat Jun 18 02:36:00 2011 Kenta Murata <mrkn@mrkn.jp>
* ext/bigdecimal/bigdecimal.c (VpNewRbClass): fix type of the 2nd
View
@@ -11,6 +11,7 @@
#include "ruby/ruby.h"
#include "ruby/util.h"
+#include "internal.h"
#include <math.h>
#include <float.h>
View
@@ -120,8 +120,6 @@ rb_class_new(VALUE super)
return rb_class_boot(super);
}
-VALUE rb_iseq_clone(VALUE iseqval, VALUE newcbase);
-
static void
rb_mod_clone_method(VALUE klass, ID mid, const rb_method_entry_t *me)
{
View
@@ -10,6 +10,7 @@
**********************************************************************/
#include "ruby/ruby.h"
+#include "internal.h"
#include <math.h>
#define USE_INSN_STACK_INCREASE 1
@@ -155,7 +156,6 @@ r_value(VALUE value)
#endif
#if CPDEBUG > 1 || CPDEBUG < 0
-PRINTF_ARGS(void ruby_debug_printf(const char*, ...), 1, 2);
#define debugs if (compile_debug_print_indent(1)) ruby_debug_printf
#define debug_compile(msg, v) ((void)(compile_debug_print_indent(1) && fputs((msg), stderr)), (v))
#else
View
@@ -6,6 +6,7 @@
*/
#include "ruby.h"
+#include "internal.h"
#include <math.h>
#define NDEBUG
@@ -508,8 +509,6 @@ imp2(hypot)
#define m_hypot(x,y) m_hypot_bang((x),(y))
-extern VALUE rb_math_log(int argc, VALUE *argv);
-
static VALUE
m_log_bang(VALUE x)
{
@@ -1092,8 +1091,6 @@ nucomp_inexact_p(VALUE self)
}
#endif
-extern VALUE rb_lcm(VALUE x, VALUE y);
-
/*
* call-seq:
* cmp.denominator -> integer
View
4 cont.c
@@ -10,6 +10,7 @@
**********************************************************************/
#include "ruby/ruby.h"
+#include "internal.h"
#include "vm_core.h"
#include "gc.h"
#include "eval_intern.h"
@@ -126,7 +127,6 @@ static VALUE rb_eFiberError;
NOINLINE(static VALUE cont_capture(volatile int *stat));
-void rb_thread_mark(rb_thread_t *th);
#define THREAD_MUST_BE_RUNNING(th) do { \
if (!(th)->tag) rb_raise(rb_eThreadError, "not running thread"); \
} while (0)
@@ -409,8 +409,6 @@ cont_new(VALUE klass)
return cont;
}
-void rb_vm_stack_to_heap(rb_thread_t *th);
-
static VALUE
cont_capture(volatile int *stat)
{
View
3 dir.c
@@ -13,6 +13,7 @@
#include "ruby/ruby.h"
#include "ruby/encoding.h"
+#include "internal.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -1996,8 +1997,6 @@ file_s_fnmatch(int argc, VALUE *argv, VALUE obj)
return Qfalse;
}
-VALUE rb_home_dir(const char *user, VALUE result);
-
/*
* call-seq:
* Dir.home() -> "/home/me"
View
@@ -11,6 +11,7 @@
#include "ruby/ruby.h"
#include "ruby/encoding.h"
+#include "internal.h"
#include "regenc.h"
#include <ctype.h>
#ifndef NO_LOCALE_CHARMAP
View
@@ -1018,8 +1018,6 @@ generator_init(VALUE obj, VALUE proc)
return obj;
}
-VALUE rb_obj_is_proc(VALUE proc);
-
/* :nodoc: */
static VALUE
generator_initialize(int argc, VALUE *argv, VALUE obj)
View
@@ -12,6 +12,7 @@
#include "ruby/ruby.h"
#include "ruby/st.h"
#include "ruby/encoding.h"
+#include "internal.h"
#include "vm_core.h"
#include <stdio.h>
@@ -230,8 +231,6 @@ rb_warn_m(VALUE self, VALUE mesg)
return Qnil;
}
-void rb_vm_bugreport(void);
-
static void
report_bug(const char *file, int line, const char *fmt, va_list args)
{
View
12 eval.c
@@ -16,6 +16,7 @@
#include "gc.h"
#include "ruby/vm.h"
#include "ruby/encoding.h"
+#include "internal.h"
#include "vm_core.h"
#define numberof(array) (int)(sizeof(array) / sizeof((array)[0]))
@@ -35,12 +36,6 @@ VALUE rb_eSysStackError;
/* initialize ruby */
-void rb_clear_trace_func(void);
-
-void rb_call_inits(void);
-void Init_heap(void);
-void Init_BareVM(void);
-
void
ruby_init(void)
{
@@ -69,8 +64,6 @@ ruby_init(void)
GET_VM()->running = 1;
}
-extern void rb_clear_trace_func(void);
-
void *
ruby_options(int argc, char **argv)
{
@@ -1053,9 +1046,6 @@ top_include(int argc, VALUE *argv, VALUE self)
return rb_mod_include(argc, argv, rb_cObject);
}
-VALUE rb_f_trace_var();
-VALUE rb_f_untrace_var();
-
static VALUE *
errinfo_place(rb_thread_t *th)
{
View
5 file.c
@@ -23,6 +23,7 @@
#include "ruby/io.h"
#include "ruby/util.h"
#include "dln.h"
+#include "internal.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -2203,8 +2204,6 @@ rb_file_s_lchown(int argc, VALUE *argv)
#define rb_file_s_lchown rb_f_notimplement
#endif
-struct timespec rb_time_timespec(VALUE time);
-
struct utime_args {
const struct timespec* tsp;
VALUE atime, mtime;
@@ -5088,8 +5087,6 @@ is_explicit_relative(const char *path)
return isdirsep(*path);
}
-VALUE rb_get_load_path(void);
-
static VALUE
copy_path_class(VALUE path, VALUE orig)
{
View
6 gc.c
@@ -50,8 +50,6 @@
# define VALGRIND_MAKE_MEM_UNDEFINED(p, n) /* empty */
#endif
-int rb_io_fptr_finalize(struct rb_io_t*);
-
#define rb_setjmp(env) RUBY_SETJMP(env)
#define rb_jmp_buf rb_jmpbuf_t
@@ -2364,8 +2362,6 @@ obj_free(rb_objspace_t *objspace, VALUE obj)
#define GC_NOTIFY 0
-void rb_vm_mark(void *ptr);
-
#if STACK_GROW_DIRECTION < 0
#define GET_STACK_BOUNDS(start, end, appendix) ((start) = STACK_END, (end) = STACK_START)
#elif STACK_GROW_DIRECTION > 0
@@ -2406,8 +2402,6 @@ mark_current_machine_context(rb_objspace_t *objspace, rb_thread_t *th)
#endif
}
-void rb_gc_mark_encodings(void);
-
static void
gc_clear_mark_on_sweep_slots(rb_objspace_t *objspace)
{
View
2 hash.c
@@ -690,8 +690,6 @@ rb_hash_default_proc(VALUE hash)
return Qnil;
}
-VALUE rb_obj_is_proc(VALUE proc);
-
/*
* call-seq:
* hsh.default_proc = proc_obj -> proc_obj
View
@@ -10,6 +10,7 @@
**********************************************************************/
#include "ruby/ruby.h"
+#include "internal.h"
#define CALL(n) {void Init_##n(void); Init_##n();}
Oops, something went wrong.

0 comments on commit e7996eb

Please sign in to comment.