[前][次][番号順一覧][スレッド一覧]

ruby-changes:9948

From: nobu <ko1@a...>
Date: Tue, 13 Jan 2009 17:31:06 +0900 (JST)
Subject: [ruby-changes:9948] Ruby:r21489 (trunk): * enc/trans/make_transdb.rb (converters): should not depend on the

nobu	2009-01-13 17:28:14 +0900 (Tue, 13 Jan 2009)

  New Revision: 21489

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21489

  Log:
    * enc/trans/make_transdb.rb (converters): should not depend on the
      hash order for cross compile.

  Modified files:
    trunk/ChangeLog
    trunk/enc/trans/make_transdb.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21488)
+++ ChangeLog	(revision 21489)
@@ -1,3 +1,8 @@
+Tue Jan 13 17:29:02 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* enc/trans/make_transdb.rb (converters): should not depend on the
+	  hash order for cross compile.
+
 Tue Jan 13 16:39:11 2009  NAKAMURA Usaku  <usa@r...>
 
 	* include/ruby/intern.h, thread.c, win32/Makefile.sub (rb_fdset_t,
Index: enc/trans/make_transdb.rb
===================================================================
--- enc/trans/make_transdb.rb	(revision 21488)
+++ enc/trans/make_transdb.rb	(revision 21489)
@@ -22,6 +22,7 @@
 
 files = {}
 names_t = []
+converter_list = []
 transdirs.each do |transdir|
   names = Dir.entries(transdir)
   names_t += names.map {|n| /(?!\A)\.trans\z/ =~ n ? $` : nil }.compact
@@ -44,6 +45,7 @@
               [path, $., from_to, *converters[from_to].values_at(3, 4)]
             else
               converters[from_to] = [$1, $2, fn[0..-3], path, $.]
+              converter_list << from_to
             end
           end
         end
@@ -51,7 +53,9 @@
     end
   end
 end
-result = converters.map {|k, v| %[rb_declare_transcoder("%s", "%s", "%s");\n] % v}.join
+result = converter_list.map do |from_to|
+  %[rb_declare_transcoder("%s", "%s", "%s");\n] % converters[from_to]
+end.join("")
 open(outhdr, 'wb') do |f|
   f.print result
 end

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]