ruby-changes:36366
From: akr <ko1@a...>
Date: Sat, 15 Nov 2014 20:49:38 +0900 (JST)
Subject: [ruby-changes:36366] akr:r48447 (trunk): * internal.h: Include ruby.h and ruby/encoding.h to be
akr 2014-11-15 20:49:06 +0900 (Sat, 15 Nov 2014) New Revision: 48447 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48447 Log: * internal.h: Include ruby.h and ruby/encoding.h to be includable without prior inclusion. Modified files: trunk/ChangeLog trunk/array.c trunk/bignum.c trunk/class.c trunk/common.mk trunk/compile.c trunk/complex.c trunk/cont.c trunk/dir.c trunk/encoding.c trunk/enum.c trunk/enumerator.c trunk/error.c trunk/eval.c trunk/ext/-test-/bignum/big2str.c trunk/ext/-test-/bignum/bigzero.c trunk/ext/-test-/bignum/depend trunk/ext/-test-/bignum/div.c trunk/ext/-test-/bignum/intpack.c trunk/ext/-test-/bignum/mul.c trunk/ext/-test-/bignum/str2big.c trunk/ext/-test-/rational/depend trunk/ext/-test-/rational/rat.c trunk/ext/-test-/string/depend trunk/ext/-test-/string/normalize.c trunk/ext/coverage/depend trunk/ext/objspace/depend trunk/ext/objspace/object_tracing.c trunk/ext/objspace/objspace.c trunk/ext/objspace/objspace_dump.c trunk/ext/pty/depend trunk/ext/pty/pty.c trunk/ext/readline/depend trunk/ext/readline/readline.c trunk/ext/ripper/depend trunk/ext/socket/depend trunk/file.c trunk/gc.c trunk/hash.c trunk/inits.c trunk/internal.h trunk/io.c trunk/iseq.c trunk/load.c trunk/localeinit.c trunk/marshal.c trunk/math.c trunk/numeric.c trunk/object.c trunk/pack.c trunk/process.c trunk/random.c trunk/range.c trunk/rational.c trunk/re.c trunk/ruby.c trunk/signal.c trunk/sprintf.c trunk/st.c trunk/string.c trunk/struct.c trunk/symbol.c trunk/time.c trunk/transcode.c trunk/util.c trunk/variable.c trunk/vm.c trunk/vm_backtrace.c trunk/vm_dump.c trunk/vm_trace.c Index: symbol.c =================================================================== --- symbol.c (revision 48446) +++ symbol.c (revision 48447) @@ -9,10 +9,8 @@ https://github.com/ruby/ruby/blob/trunk/symbol.c#L9 **********************************************************************/ -#include "ruby/ruby.h" -#include "ruby/st.h" -#include "ruby/encoding.h" #include "internal.h" +#include "ruby/st.h" #include "node.h" #include "symbol.h" #include "gc.h" Index: complex.c =================================================================== --- complex.c (revision 48446) +++ complex.c (revision 48447) @@ -5,7 +5,6 @@ https://github.com/ruby/ruby/blob/trunk/complex.c#L5 which is written in ruby. */ -#include "ruby.h" #include "internal.h" #include <math.h> Index: array.c =================================================================== --- array.c (revision 48446) +++ array.c (revision 48447) @@ -11,11 +11,9 @@ https://github.com/ruby/ruby/blob/trunk/array.c#L11 **********************************************************************/ -#include "ruby/ruby.h" +#include "internal.h" #include "ruby/util.h" #include "ruby/st.h" -#include "ruby/encoding.h" -#include "internal.h" #include "probes.h" #include "id.h" Index: encoding.c =================================================================== --- encoding.c (revision 48446) +++ encoding.c (revision 48447) @@ -9,8 +9,6 @@ https://github.com/ruby/ruby/blob/trunk/encoding.c#L9 **********************************************************************/ -#include "ruby/ruby.h" -#include "ruby/encoding.h" #include "internal.h" #include "regenc.h" #include <ctype.h> Index: math.c =================================================================== --- math.c (revision 48446) +++ math.c (revision 48447) @@ -9,7 +9,6 @@ https://github.com/ruby/ruby/blob/trunk/math.c#L9 **********************************************************************/ -#include "ruby/ruby.h" #include "internal.h" #include <float.h> #include <math.h> Index: time.c =================================================================== --- time.c (revision 48446) +++ time.c (revision 48447) @@ -9,12 +9,10 @@ https://github.com/ruby/ruby/blob/trunk/time.c#L9 **********************************************************************/ -#include "ruby/ruby.h" +#include "internal.h" #include <sys/types.h> #include <time.h> #include <errno.h> -#include "ruby/encoding.h" -#include "internal.h" #ifdef HAVE_UNISTD_H #include <unistd.h> Index: re.c =================================================================== --- re.c (revision 48446) +++ re.c (revision 48447) @@ -9,11 +9,9 @@ https://github.com/ruby/ruby/blob/trunk/re.c#L9 **********************************************************************/ -#include "ruby/ruby.h" +#include "internal.h" #include "ruby/re.h" -#include "ruby/encoding.h" #include "ruby/util.h" -#include "internal.h" #include "regint.h" #include <ctype.h> Index: ChangeLog =================================================================== --- ChangeLog (revision 48446) +++ ChangeLog (revision 48447) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Nov 15 20:34:23 2014 Tanaka Akira <akr@f...> + + * internal.h: Include ruby.h and ruby/encoding.h to be + includable without prior inclusion. + Sat Nov 15 20:46:44 2014 Kouhei Sutou <kou@c...> * test/rexml/test_document.rb Index: enumerator.c =================================================================== --- enumerator.c (revision 48446) +++ enumerator.c (revision 48447) @@ -12,9 +12,8 @@ https://github.com/ruby/ruby/blob/trunk/enumerator.c#L12 ************************************************/ -#include "ruby/ruby.h" -#include "node.h" #include "internal.h" +#include "node.h" /* * Document-class: Enumerator Index: variable.c =================================================================== --- variable.c (revision 48446) +++ variable.c (revision 48447) @@ -11,13 +11,11 @@ https://github.com/ruby/ruby/blob/trunk/variable.c#L11 **********************************************************************/ -#include "ruby/ruby.h" +#include "internal.h" #include "ruby/st.h" #include "ruby/util.h" -#include "ruby/encoding.h" #include "node.h" #include "constant.h" -#include "internal.h" #include "id.h" st_table *rb_global_tbl; Index: iseq.c =================================================================== --- iseq.c (revision 48446) +++ iseq.c (revision 48447) @@ -9,9 +9,8 @@ https://github.com/ruby/ruby/blob/trunk/iseq.c#L9 **********************************************************************/ -#include "ruby/ruby.h" -#include "ruby/util.h" #include "internal.h" +#include "ruby/util.h" #include "eval_intern.h" /* #define RUBY_MARK_FREE_DEBUG 1 */ Index: enum.c =================================================================== --- enum.c (revision 48446) +++ enum.c (revision 48447) @@ -9,11 +9,10 @@ https://github.com/ruby/ruby/blob/trunk/enum.c#L9 **********************************************************************/ -#include "ruby/ruby.h" +#include "internal.h" #include "ruby/util.h" #include "node.h" #include "id.h" -#include "internal.h" VALUE rb_f_send(int argc, VALUE *argv, VALUE recv); Index: string.c =================================================================== --- string.c (revision 48446) +++ string.c (revision 48447) @@ -11,10 +11,8 @@ https://github.com/ruby/ruby/blob/trunk/string.c#L11 **********************************************************************/ -#include "ruby/ruby.h" -#include "ruby/re.h" -#include "ruby/encoding.h" #include "internal.h" +#include "ruby/re.h" #include "probes.h" #include "gc.h" #include <assert.h> Index: object.c =================================================================== --- object.c (revision 48446) +++ object.c (revision 48447) @@ -11,17 +11,15 @@ https://github.com/ruby/ruby/blob/trunk/object.c#L11 **********************************************************************/ -#include "ruby/ruby.h" +#include "internal.h" #include "ruby/st.h" #include "ruby/util.h" -#include "ruby/encoding.h" #include <stdio.h> #include <errno.h> #include <ctype.h> #include <math.h> #include <float.h> #include "constant.h" -#include "internal.h" #include "id.h" #include "probes.h" Index: io.c =================================================================== --- io.c (revision 48446) +++ io.c (revision 48447) @@ -11,11 +11,10 @@ https://github.com/ruby/ruby/blob/trunk/io.c#L11 **********************************************************************/ -#include "ruby/ruby.h" +#include "internal.h" #include "ruby/io.h" #include "ruby/thread.h" #include "dln.h" -#include "internal.h" #include "id.h" #include <ctype.h> #include <errno.h> Index: pack.c =================================================================== --- pack.c (revision 48446) +++ pack.c (revision 48447) @@ -9,8 +9,6 @@ https://github.com/ruby/ruby/blob/trunk/pack.c#L9 **********************************************************************/ -#include "ruby/ruby.h" -#include "ruby/encoding.h" #include "internal.h" #include <sys/types.h> #include <ctype.h> Index: load.c =================================================================== --- load.c (revision 48446) +++ load.c (revision 48447) @@ -2,9 +2,8 @@ https://github.com/ruby/ruby/blob/trunk/load.c#L2 * load methods from eval.c */ -#include "ruby/ruby.h" -#include "ruby/util.h" #include "internal.h" +#include "ruby/util.h" #include "dln.h" #include "eval_intern.h" #include "probes.h" Index: localeinit.c =================================================================== --- localeinit.c (revision 48446) +++ localeinit.c (revision 48447) @@ -9,8 +9,6 @@ https://github.com/ruby/ruby/blob/trunk/localeinit.c#L9 **********************************************************************/ -#include "ruby/ruby.h" -#include "ruby/encoding.h" #include "internal.h" #ifdef __CYGWIN__ #include <windows.h> Index: st.c =================================================================== --- st.c (revision 48446) +++ st.c (revision 48447) @@ -6,7 +6,6 @@ https://github.com/ruby/ruby/blob/trunk/st.c#L6 #include "regint.h" #include "st.h" #else -#include "ruby/ruby.h" #include "internal.h" #endif Index: compile.c =================================================================== --- compile.c (revision 48446) +++ compile.c (revision 48447) @@ -9,7 +9,6 @@ https://github.com/ruby/ruby/blob/trunk/compile.c#L9 **********************************************************************/ -#include "ruby/ruby.h" #include "internal.h" #include <math.h> Index: range.c =================================================================== --- range.c (revision 48446) +++ range.c (revision 48447) @@ -9,8 +9,6 @@ https://github.com/ruby/ruby/blob/trunk/range.c#L9 **********************************************************************/ -#include "ruby/ruby.h" -#include "ruby/encoding.h" #include "internal.h" #include "id.h" Index: common.mk =================================================================== --- common.mk (revision 48446) +++ common.mk (revision 48447) @@ -2091,4 +2091,104 @@ vm_trace.$(OBJEXT): {$(VPATH)}thread_nat https://github.com/ruby/ruby/blob/trunk/common.mk#L2091 vm_trace.$(OBJEXT): {$(VPATH)}vm_core.h vm_trace.$(OBJEXT): {$(VPATH)}vm_debug.h vm_trace.$(OBJEXT): {$(VPATH)}vm_opts.h +array.$(OBJEXT): $(hdrdir)/ruby.h +bignum.$(OBJEXT): $(hdrdir)/ruby.h +bignum.$(OBJEXT): {$(VPATH)}encoding.h +bignum.$(OBJEXT): {$(VPATH)}oniguruma.h +class.$(OBJEXT): $(hdrdir)/ruby.h +class.$(OBJEXT): {$(VPATH)}encoding.h +class.$(OBJEXT): {$(VPATH)}oniguruma.h +compile.$(OBJEXT): $(hdrdir)/ruby.h +compile.$(OBJEXT): {$(VPATH)}encoding.h +compile.$(OBJEXT): {$(VPATH)}oniguruma.h +complex.$(OBJEXT): {$(VPATH)}encoding.h +complex.$(OBJEXT): {$(VPATH)}oniguruma.h +cont.$(OBJEXT): $(hdrdir)/ruby.h +cont.$(OBJEXT): {$(VPATH)}encoding.h +cont.$(OBJEXT): {$(VPATH)}oniguruma.h +debug.$(OBJEXT): $(hdrdir)/ruby.h +dir.$(OBJEXT): $(hdrdir)/ruby.h +encoding.$(OBJEXT): $(hdrdir)/ruby.h +enum.$(OBJEXT): $(hdrdir)/ruby.h +enum.$(OBJEXT): {$(VPATH)}encoding.h +enum.$(OBJEXT): {$(VPATH)}oniguruma.h +enumerator.$(OBJEXT): $(hdrdir)/ruby.h +enumerator.$(OBJEXT): {$(VPATH)}encoding.h +enumerator.$(OBJEXT): {$(VPATH)}oniguruma.h +error.$(OBJEXT): $(hdrdir)/ruby.h +eval.$(OBJEXT): $(hdrdir)/ruby.h +file.$(OBJEXT): $(hdrdir)/ruby.h +gc.$(OBJEXT): $(hdrdir)/ruby.h +golf_prelude.$(OBJEXT): $(hdrdir)/ruby.h +golf_prelude.$(OBJEXT): {$(VPATH)}encoding.h +golf_prelude.$(OBJEXT): {$(VPATH)}oniguruma.h +hash.$(OBJEXT): $(hdrdir)/ruby.h +inits.$(OBJEXT): $(hdrdir)/ruby.h +inits.$(OBJEXT): {$(VPATH)}encoding.h +inits.$(OBJEXT): {$(VPATH)}oniguruma.h +io.$(OBJEXT): $(hdrdir)/ruby.h +iseq.$(OBJEXT): $(hdrdir)/ruby.h +iseq.$(OBJEXT): {$(VPATH)}encoding.h +iseq.$(OBJEXT): {$(VPATH)}oniguruma.h +load.$(OBJEXT): $(hdrdir)/ruby.h +load.$(OBJEXT): {$(VPATH)}encoding.h +load.$(OBJEXT): {$(VPATH)}oniguruma.h +localeinit.$(OBJEXT): $(hdrdir)/ruby.h +marshal.$(OBJEXT): $(hdrdir)/ruby.h +math.$(OBJEXT): $(hdrdir)/ruby.h +math.$(OBJEXT): {$(VPATH)}encoding.h +math.$(OBJEXT): {$(VPATH)}oniguruma.h +miniprelude.$(OBJEXT): $(hdrdir)/ruby.h +miniprelude.$(OBJEXT): {$(VPATH)}encoding.h +miniprelude.$(OBJEXT): {$(VPATH)}oniguruma.h +node.$(OBJEXT): $(hdrdir)/ruby.h +node.$(OBJEXT): {$(VPATH)}encoding.h +node.$(OBJEXT): {$(VPATH)}oniguruma.h +numeric.$(OBJEXT): $(hdrdir)/ruby.h +object.$(OBJEXT): $(hdrdir)/ruby.h +pack.$(OBJEXT): $(hdrdir)/ruby.h +parse.$(OBJEXT): $(hdrdir)/ruby.h +prelude.$(OBJEXT): $(hdrdir)/ruby.h +prelude.$(OBJEXT): {$(VPATH)}encoding.h +prelude.$(OBJEXT): {$(VPATH)}oniguruma.h +proc.$(OBJEXT): $(hdrdir)/ruby.h +proc.$(OBJEXT): {$(VPATH)}encoding.h +proc.$(OBJEXT): {$(VPATH)}oniguruma.h +process.$(OBJEXT): $(hdrdir)/ruby.h +random.$(OBJEXT): $(hdrdir)/ruby.h +random.$(OBJEXT): {$(VPATH)}encoding.h +random.$(OBJEXT): {$(VPATH)}oniguruma.h +range.$(OBJEXT): $(hdrdir)/ruby.h +rational.$(OBJEXT): {$(VPATH)}encoding.h +rational.$(OBJEXT): {$(VPATH)}oniguruma.h +re.$(OBJEXT): $(hdrdir)/ruby.h +ruby.$(OBJEXT): $(hdrdir)/ruby.h +safe.$(OBJEXT): $(hdrdir)/ruby.h +safe.$(OBJEXT): {$(VPATH)}encoding.h +safe.$(OBJEXT): {$(VPATH)}oniguruma.h +signal.$(OBJEXT): $(hdrdir)/ruby.h +signal.$(OBJEXT): {$(VPATH)}encoding.h +signal.$(OBJEXT): {$(VPATH)}oniguruma.h +sprintf.$(OBJEXT): $(hdrdir)/ruby.h +st.$(OBJEXT): $(hdrdir)/ruby.h +st.$(OBJEXT): {$(VPATH)}encoding.h +st.$(OBJEXT): {$(VPATH)}oniguruma.h +string.$(OBJEXT): $(hdrdir)/ruby.h +struct.$(OBJEXT): $(hdrdir)/ruby.h +struct.$(OBJEXT): {$(VPATH)}encoding.h +struct.$(OBJEXT): {$(VPATH)}oniguruma.h +symbol.$(OBJEXT): $(hdrdir)/ruby.h +thread.$(OBJEXT): $(hdrdir)/ruby.h +time.$(OBJEXT): $(hdrdir)/ruby.h +transcode.$(OBJEXT): $(hdrdir)/ruby.h +util.$(OBJEXT): $(hdrdir)/ruby.h +util.$(OBJEXT): {$(VPATH)}encoding.h +util.$(OBJEXT): {$(VPATH)}oniguruma.h +variable.$(OBJEXT): $(hdrdir)/ruby.h +vm.$(OBJEXT): $(hdrdir)/ruby.h +vm_backtrace.$(OBJEXT): $(hdrdir)/ruby.h +vm_dump.$(OBJEXT): $(hdrdir)/ruby.h +vm_dump.$(OBJEXT): {$(VPATH)}encoding.h +vm_dump.$(OBJEXT): {$(VPATH)}oniguruma.h +vm_trace.$(OBJEXT): $(hdrdir)/ruby.h # AUTOGENERATED DEPENDENCIES END Index: dir.c =================================================================== --- dir.c (revision 48446) +++ dir.c (revision 48447) @@ -11,8 +11,6 @@ https://github.com/ruby/ruby/blob/trunk/dir.c#L11 **********************************************************************/ -#include "ruby/ruby.h" -#include "ruby/encoding.h" #include "internal.h" #include <sys/types.h> Index: vm_backtrace.c =================================================================== --- vm_backtrace.c (revision 48446) +++ vm_backtrace.c (revision 48447) @@ -9,11 +9,9 @@ https://github.com/ruby/ruby/blob/trunk/vm_backtrace.c#L9 **********************************************************************/ -#include "ruby/ruby.h" -#include "ruby/encoding.h" +#include "internal.h" #include "ruby/debug.h" -#include "internal.h" #include "vm_core.h" #include "eval_intern.h" #include "iseq.h" Index: struct.c =================================================================== --- struct.c (revision 48446) +++ struct.c (revision 48447) @@ -9,7 +9,6 @@ https://github.com/ruby/ruby/blob/trunk/struct.c#L9 **********************************************************************/ -#include "ruby/ruby.h" #include "internal.h" VALUE rb_cStruct; Index: sprintf.c =================================================================== --- sprintf.c (revision 48446) +++ sprintf.c (revision 48447) @@ -11,10 +11,8 @@ https://github.com/ruby/ruby/blob/trunk/sprintf.c#L11 **********************************************************************/ -#include "ruby/ruby.h" -#include "ruby/re.h" -#include "ruby/encoding.h" #include "internal.h" +#include "ruby/re.h" #include "id.h" #include <math.h> #include <stdarg.h> Index: eval.c =================================================================== --- eval.c (revision 48446) +++ eval.c (revision 48447) @@ -11,12 +11,11 @@ https://github.com/ruby/ruby/blob/trunk/eval.c#L11 **********************************************************************/ +#include "internal.h" #include "eval_intern.h" #include "iseq.h" #include "gc.h" #include "ruby/vm.h" -#include "ruby/encoding.h" -#include "internal.h" #include "vm_core.h" #include "probes_helper.h" Index: gc.c =================================================================== --- gc.c (revision 48446) +++ gc.c (revision 48447) @@ -11,7 +11,7 @@ https://github.com/ruby/ruby/blob/trunk/gc.c#L11 **********************************************************************/ -#include "ruby/ruby.h" +#include "internal.h" #include "ruby/st.h" #include "ruby/re.h" #include "ruby/io.h" @@ -20,7 +20,6 @@ https://github.com/ruby/ruby/blob/trunk/gc.c#L20 #include "ruby/debug.h" #include "eval_intern.h" #include "vm_core.h" -#include "internal.h" #include "gc.h" #include "constant.h" #include "ruby_atomic.h" Index: class.c =================================================================== --- class.c (revision 48446) +++ class.c (revision 48447) @@ -23,12 +23,11 @@ https://github.com/ruby/ruby/blob/trunk/class.c#L23 * \{ */ -#include "ruby/ruby.h" +#include "internal.h" #include "ruby/st.h" #include "method.h" #include "constant.h" #include "vm_core.h" -#include "internal.h" #include <ctype.h> int rb_vm_add_root_module(ID id, VALUE module); Index: util.c =================================================================== --- util.c (revision 48446) +++ util.c (revision 48447) @@ -9,7 +9,6 @@ https://github.com/ruby/ruby/blob/trunk/util.c#L9 **********************************************************************/ -#include "ruby/ruby.h" #include "internal.h" #include <ctype.h> Index: process.c =================================================================== --- process.c (revision 48446) +++ process.c (revision 48447) @@ -11,11 +11,10 @@ https://github.com/ruby/ruby/blob/trunk/process.c#L11 **********************************************************************/ -#include "ruby/ruby.h" +#include "internal.h" #include "ruby/io.h" #include "ruby/thread.h" #include "ruby/util.h" -#include "internal.h" #include "vm_core.h" #include <stdio.h> Index: ext/objspace/depend =================================================================== --- ext/objspace/depend (revision 48446) +++ ext/objspace/depend (revision 48447) @@ -51,4 +51,9 @@ objspace_dump.o: $(hdrdir)/ruby/missing. https://github.com/ruby/ruby/blob/trunk/ext/objspace/depend#L51 objspace_dump.o: $(hdrdir)/ruby/ruby.h objspace_dump.o: $(hdrdir)/ruby/st.h objspace_dump.o: $(hdrdir)/ruby/subst.h +object_tracing.o: $(top_srcdir)/include/ruby.h +object_tracing.o: $(hdrdir)/ruby/encoding.h +object_tracing.o: $(hdrdir)/ruby/oniguruma.h +objspace.o: $(top_srcdir)/include/ruby.h +objspace_dump.o: $(top_srcdir)/include/ruby.h # AUTOGENERATED DEPENDENCIES END Index: ext/objspace/objspace.c =================================================================== --- ext/objspace/objspace.c (revision 48446) +++ ext/objspace/objspace.c (revision 48447) @@ -12,13 +12,12 @@ https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace.c#L12 **********************************************************************/ -#include <ruby/ruby.h> +#include "internal.h" #include <ruby/st.h> #include <ruby/io.h> #include <ruby/re.h> #include "node.h" #include "gc.h" -#include "internal.h" /* * call-seq: Index: ext/objspace/objspace_dump.c =================================================================== --- ext/objspace/objspace_dump.c (revision 48446) +++ ext/objspace/objspace_dump.c (revision 48447) @@ -12,15 +12,13 @@ https://github.com/ruby/ruby/blob/trunk/ext/objspace/objspace_dump.c#L12 **********************************************************************/ -#include "ruby/ruby.h" +#include "internal.h" #include "ruby/debug.h" -#include "ruby/encoding.h" #include "ruby/io.h" #include "gc.h" #include "node.h" #include "vm_core.h" #include "objspace.h" -#include "internal.h" static VALUE sym_output, sym_stdout, sym_string, sym_file; Index: ext/objspace/object_tracing.c =================================================================== --- ext/objspace/object_tracing.c (revision 48446) +++ ext/objspace/object_tracing.c (revision 48447) @@ -13,10 +13,9 @@ https://github.com/ruby/ruby/blob/trunk/ext/objspace/object_tracing.c#L13 **********************************************************************/ -#include "ruby/ruby.h" +#include "internal.h" #include "ruby/debug.h" #include "objspace.h" -#include "internal.h" struct traceobj_arg { int running; Index: ext/coverage/depend =================================================================== --- ext/coverage/depend (revision (... truncated) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/