summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2024-11-16 22:46:26 +0900
committernagachika <nagachika@ruby-lang.org>2025-11-08 14:36:08 +0900
commitc5398d13977a22a470a17263ae38d773f5801606 (patch)
tree2c920c100743b6e017c92419b49f10cfd00ca4a7
parent9f045b904d7403741611146a0d907534ee0dce48 (diff)
mkexports.rb: Revert removed flip-flop
This reverts commit 63ae1e3cb5d302e5229143c00152328166d26780.
-rwxr-xr-xwin32/mkexports.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/win32/mkexports.rb b/win32/mkexports.rb
index 0c6db1de11..389b49def8 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!
@@ -133,8 +129,6 @@ class Exports::Mswin < Exports
next
end
yield l.strip, is_data
- else
- filetype = l[/^File Type: (.+)/, 1]
end
end
yield "strcasecmp", "msvcrt.stricmp"