summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
Diffstat (limited to 'tool')
-rwxr-xr-xtool/leaked-globals5
1 files changed, 3 insertions, 2 deletions
diff --git a/tool/leaked-globals b/tool/leaked-globals
index d95f3794e8..083f658fb1 100755
--- a/tool/leaked-globals
+++ b/tool/leaked-globals
@@ -29,8 +29,9 @@ if platform and !platform.empty?
else
REPLACE.concat(
h .gsub(%r[/\*.*?\*/]m, " ") # delete block comments
- .gsub(%r[//.*], ' ') # delete oneline comments
+ .gsub(%r[//.*], " ") # delete oneline comments
.gsub(/^\s*#.*(?:\\\n.*)*/, "") # delete preprocessor directives
+ .gsub(/(?:\A|;)\K\s*typedef\s.*?;/m, "")
.scan(/\b((?!rb_|DEPRECATED|_)\w+)\s*\(.*\);/)
.flatten)
end
@@ -44,7 +45,7 @@ ARGV.reject! do |n|
end
print "Checking leaked global symbols..."
STDOUT.flush
-IO.foreach("|#{NM} -Pgp #{ARGV.join(' ')}") do |line|
+IO.foreach("|#{NM} #{ARGV.join(' ')}") do |line|
n, t, = line.split
next unless /[A-TV-Z]/ =~ t
next unless n.sub!(/^#{SYMBOL_PREFIX}/o, "")