зеркало из https://github.com/github/ruby.git
* enc/trans/make_transdb.rb (converters): should not depend on the
hash order for cross compile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
7371086f68
Коммит
4cb8d3316a
|
@ -1,3 +1,8 @@
|
|||
Tue Jan 13 17:29:02 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* 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@ruby-lang.org>
|
||||
|
||||
* include/ruby/intern.h, thread.c, win32/Makefile.sub (rb_fdset_t,
|
||||
|
|
|
@ -22,6 +22,7 @@ transdirs = transdirs.sort_by {|td|
|
|||
|
||||
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 @@ transdirs.each do |transdir|
|
|||
[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 @@ transdirs.each do |transdir|
|
|||
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче