ruby-changes:37866
From: ko1 <ko1@a...>
Date: Thu, 12 Mar 2015 10:56:18 +0900 (JST)
Subject: [ruby-changes:37866] ko1:r49947 (trunk): * internal.h, node.h: move a definition of `struct rb_global_entry'
ko1 2015-03-12 10:55:58 +0900 (Thu, 12 Mar 2015) New Revision: 49947 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49947 Log: * internal.h, node.h: move a definition of `struct rb_global_entry' and related functions from node.h to internal.h. * variable.c: remove unused include pragma. * common.mk: remove unused dependency. Modified files: trunk/ChangeLog trunk/common.mk trunk/internal.h trunk/node.h trunk/variable.c Index: ChangeLog =================================================================== --- ChangeLog (revision 49946) +++ ChangeLog (revision 49947) @@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Mar 12 10:53:06 2015 Koichi Sasada <ko1@a...> + + * internal.h, node.h: move a definition of `struct rb_global_entry' + and related functions from node.h to internal.h. + + * variable.c: remove unused include pragma. + + * common.mk: remove unused dependency. + Thu Mar 12 10:32:39 2015 Koichi Sasada <ko1@a...> * common.mk: remove unused dependency. Index: variable.c =================================================================== --- variable.c (revision 49946) +++ variable.c (revision 49947) @@ -14,7 +14,6 @@ https://github.com/ruby/ruby/blob/trunk/variable.c#L14 #include "internal.h" #include "ruby/st.h" #include "ruby/util.h" -#include "node.h" #include "constant.h" #include "id.h" Index: common.mk =================================================================== --- common.mk (revision 49946) +++ common.mk (revision 49947) @@ -2279,7 +2279,6 @@ variable.$(OBJEXT): {$(VPATH)}intern.h https://github.com/ruby/ruby/blob/trunk/common.mk#L2279 variable.$(OBJEXT): {$(VPATH)}internal.h variable.$(OBJEXT): {$(VPATH)}io.h variable.$(OBJEXT): {$(VPATH)}missing.h -variable.$(OBJEXT): {$(VPATH)}node.h variable.$(OBJEXT): {$(VPATH)}oniguruma.h variable.$(OBJEXT): {$(VPATH)}st.h variable.$(OBJEXT): {$(VPATH)}subst.h Index: internal.h =================================================================== --- internal.h (revision 49946) +++ internal.h (revision 49947) @@ -615,6 +615,18 @@ struct MEMO { https://github.com/ruby/ruby/blob/trunk/internal.h#L615 #define NEW_MEMO_FOR(type, value) \ ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value)) +/* global variable */ + +struct rb_global_entry { + struct rb_global_variable *var; + ID id; +}; + +struct rb_global_entry *rb_global_entry(ID); +VALUE rb_gvar_get(struct rb_global_entry *); +VALUE rb_gvar_set(struct rb_global_entry *, VALUE); +VALUE rb_gvar_defined(struct rb_global_entry *); + struct vtm; /* defined by timev.h */ /* array.c */ Index: node.h =================================================================== --- node.h (revision 49946) +++ node.h (revision 49947) @@ -481,15 +481,6 @@ void rb_gc_free_node(VALUE obj); https://github.com/ruby/ruby/blob/trunk/node.h#L481 size_t rb_node_memsize(VALUE obj); VALUE rb_gc_mark_node(NODE *obj); -struct rb_global_entry { - struct rb_global_variable *var; - ID id; -}; - -struct rb_global_entry *rb_global_entry(ID); -VALUE rb_gvar_get(struct rb_global_entry *); -VALUE rb_gvar_set(struct rb_global_entry *, VALUE); -VALUE rb_gvar_defined(struct rb_global_entry *); const struct kwtable *rb_reserved_word(const char *, unsigned int); struct rb_args_info { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/