Skip to content

Commit

Permalink
Fix hash reference use
Browse files Browse the repository at this point in the history
  • Loading branch information
DHowett authored and rpetrich committed Apr 3, 2012
1 parent b5f4981 commit 229e17e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions objc_api_visibility.pl
Expand Up @@ -96,16 +96,16 @@ sub read_methods {
# ...mark each as private and add class names
my $method = shift;
my $class_name = shift;
%method_map->{$method}{'visibility'} = 'private';
%method_map->{$method}{'classes'}{$class_name} = 1;
$method_map{$method}->{'visibility'} = 'private';
$method_map{$method}->{'classes'}->{$class_name} = 1;
}
}
foreach my $header(split("\0", `find "$sdk_path/System/Library/Frameworks" -name "*.h" -type f -print0`)) {
# Find methods declared in headers
read_methods "cat $header", sub {
# ...mark each as public
my $method = shift;
%method_map->{$method}{'visibility'} = 'public';
$method_map{$method}->{'visibility'} = 'public';
}
}

Expand All @@ -122,8 +122,8 @@ sub read_methods {

# Ouput as TSV with the following fields visibility, method name, class names sorted by method name
foreach my $method(sort @names_to_output) {
my $visibility = %method_map->{$method}{'visibility'};
my $visibility = $method_map{$method}->{'visibility'};
$visibility = 'new' if length($visibility) == 0;
my $classes = join("\t", keys(%{ %method_map->{$method}{'classes'} }));
my $classes = join("\t", keys(%{ $method_map{$method}->{'classes'} }));
print "$visibility\t$method\t$classes\n";
}

0 comments on commit 229e17e

Please sign in to comment.