ruby-changes:14232
From: nobu <ko1@a...>
Date: Thu, 10 Dec 2009 00:47:01 +0900 (JST)
Subject: [ruby-changes:14232] Ruby:r26054 (trunk): * node.c (dump_node): fixed for long members.
nobu 2009-12-10 00:46:45 +0900 (Thu, 10 Dec 2009) New Revision: 26054 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26054 Log: * node.c (dump_node): fixed for long members. Modified files: trunk/ChangeLog trunk/node.c trunk/version.h Index: ChangeLog =================================================================== --- ChangeLog (revision 26053) +++ ChangeLog (revision 26054) @@ -1,3 +1,7 @@ +Thu Dec 10 00:46:43 2009 Nobuyoshi Nakada <nobu@r...> + + * node.c (dump_node): fixed for long members. + Wed Dec 9 22:57:04 2009 Yusuke Endoh <mame@t...> * node.c: node management added. Currently, only pretty-dumper is Index: version.h =================================================================== --- version.h (revision 26053) +++ version.h (revision 26054) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_RELEASE_DATE "2009-12-09" +#define RUBY_RELEASE_DATE "2009-12-10" #define RUBY_PATCHLEVEL -1 #define RUBY_BRANCH_NAME "trunk" @@ -8,7 +8,7 @@ #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_YEAR 2009 #define RUBY_RELEASE_MONTH 12 -#define RUBY_RELEASE_DAY 9 +#define RUBY_RELEASE_DAY 10 #include "ruby/version.h" Index: node.c =================================================================== --- node.c (revision 26053) +++ node.c (revision 26054) @@ -18,6 +18,7 @@ #define A_INDENT add_indent(buf, indent) #define A_ID(id) add_id(buf, id) #define A_INT(val) rb_str_catf(buf, "%d", (val)); +#define A_LONG(val) rb_str_catf(buf, "%ld", (val)); #define A_LIT(lit) AR(rb_inspect(lit)) #define A_NODE_HEADER(node) \ rb_str_catf(buf, "@ %s (line: %d)", ruby_node_name(nd_type(node)), nd_line(node)) @@ -44,6 +45,7 @@ #define F_ID(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_ID(node->name)) #define F_GENTRY(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_ID((node->name)->id)) #define F_INT(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_INT(node->name)) +#define F_LONG(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_LONG(node->name)) #define F_LIT(name, ann) SIMPLE_FIELD(#name, #name " (" ann ")", A_LIT(node->name)) #define F_MSG(name, ann, desc) SIMPLE_FIELD(#name, #name " (" ann ")", A(desc)) @@ -148,9 +150,9 @@ ANN("until statement"); ANN("format: until [nd_cond]; [nd_body]; end"); ANN("example: until x == 1; foo; end"); - loop: + loop: F_CUSTOM1(nd_state, "begin-end-while?", { - A_INT(node->nd_state); + A_INT((int)node->nd_state); A((node->nd_state == 1) ? " (while-end)" : " (begin-end-while)"); }); F_NODE(nd_cond, "condition"); @@ -422,7 +424,7 @@ ANN("format: [ [nd_head], [nd_next].. ] (length: [nd_alen])"); ANN("example: return 1, 2, 3"); ary: - F_INT(nd_alen, "length"); + F_LONG(nd_alen, "length"); F_NODE(nd_head, "element"); LAST_NODE; F_NODE(nd_next, "next element"); @@ -489,7 +491,7 @@ ANN("nth special variable reference"); ANN("format: $[nd_nth]"); ANN("example: $1, $2, .."); - F_CUSTOM1(nd_nth, "variable", { A("$"); A_INT(node->nd_nth); }); + F_CUSTOM1(nd_nth, "variable", { A("$"); A_LONG(node->nd_nth); }); break; case NODE_BACK_REF: @@ -853,7 +855,7 @@ D_NODE_HEADER(node); ANN("method parameters (cont'd)"); F_ID(nd_pid, "first post argument"); - F_INT(nd_plen, "post argument length"); + F_LONG(nd_plen, "post argument length"); LAST_NODE; F_CUSTOM2(nd_next, "aux info 3", { node = node->nd_next; @@ -877,7 +879,7 @@ ANN("method parameters"); ANN("format: def method_name(.., [nd_opt=some], *[nd_rest], [nd_pid], .., &[nd_body])"); ANN("example: def foo(a, b, opt1=1, opt2=2, *rest, y, z, &blk); end"); - F_INT(nd_frml, "argc"); + F_LONG(nd_frml, "argc"); F_NODE(nd_next, "aux info 1"); LAST_NODE; F_NODE(nd_opt, "optional arguments"); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/