diff --git a/win32/mkexports.rb b/win32/mkexports.rb index dd0fbf6313..1a37c7ee91 100755 --- a/win32/mkexports.rb +++ b/win32/mkexports.rb @@ -106,11 +106,7 @@ class Exports::Mswin < Exports objs = objs.collect {|s| s.tr('/', '\\')} filetype = nil objdump(objs) do |l| - if filetype - if /^\f/ =~ l - filetype = nil - next - end + if (filetype = l[/^File Type: (.+)/, 1])..(/^\f/ =~ l) case filetype when /OBJECT/, /LIBRARY/ l.chomp! @@ -132,8 +128,6 @@ class Exports::Mswin < Exports next end yield l.strip, is_data - else - filetype = l[/^File Type: (.+)/, 1] end end yield "strcasecmp", "msvcrt.stricmp"