diff options
author | Francois Perrad <francois.perrad@gadz.org> | 2010-10-26 13:54:21 +0200 |
---|---|---|
committer | Francois Perrad <francois.perrad@gadz.org> | 2010-10-26 13:54:21 +0200 |
commit | 6240dbcb2324b190e10c475d49351344573a11fe (patch) | |
tree | 99405a15f4f732acffffb50c4da8fa86cda7eba2 | |
parent | add a png foreach API (diff) | |
download | api-description-6240dbcb2324b190e10c475d49351344573a11fe.tar.gz |
spore2dot: check duplicated method
-rw-r--r-- | utils/spore2dot.pl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/spore2dot.pl b/utils/spore2dot.pl index a49fffe..53424b0 100644 --- a/utils/spore2dot.pl +++ b/utils/spore2dot.pl @@ -33,6 +33,7 @@ if ($has_interface) { } +my %meth; foreach my $spec (@specs) { my $name = $spec->{meta}->{module} || $spec->{name}; print " \"", $name, "\"\n"; @@ -40,6 +41,8 @@ foreach my $spec (@specs) { print "«interface»\\n" if ($has_interface); print "\\N|"; for my $name (sort keys %{$spec->{methods}}) { + die "duplicated $name" if exists $meth{$name}; + $meth{$name} = 1; my $desc = $spec->{methods}->{$name}; print $name, "("; my $first = 1; |