about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrancois Perrad <francois.perrad@gadz.org>2010-10-26 13:54:21 +0200
committerFrancois Perrad <francois.perrad@gadz.org>2010-10-26 13:54:21 +0200
commit6240dbcb2324b190e10c475d49351344573a11fe (patch)
tree99405a15f4f732acffffb50c4da8fa86cda7eba2
parentadd a png foreach API (diff)
downloadapi-description-6240dbcb2324b190e10c475d49351344573a11fe.tar.gz
spore2dot: check duplicated method
-rw-r--r--utils/spore2dot.pl3
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 "&laquo;interface&raquo;\\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;