Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-03-27 12:05:59 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-03-28 10:30:15 -0400
commit852c42e3407f764fd10673f9ad0520e1db3f4b92 (patch)
treeed16aa2aca4e23ef1042e6635066ca13cb86e6fd /src
parentd284d75f3960247c324b2c9916256a2474eab432 (diff)
downloadtame-852c42e3407f764fd10673f9ad0520e1db3f4b92.tar.gz
tame-852c42e3407f764fd10673f9ad0520e1db3f4b92.tar.bz2
tame-852c42e3407f764fd10673f9ad0520e1db3f4b92.zip
symtable: Detect duplicate symbols in the same package
* src/symtable.xsl (symtable:find-duplicates): Update description. Find duplicates in same package. * test/symtable.xspec: Update test case accordingly.
Diffstat (limited to 'src')
-rw-r--r--src/symtable.xsl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/symtable.xsl b/src/symtable.xsl
index 7400829..228efad 100644
--- a/src/symtable.xsl
+++ b/src/symtable.xsl
@@ -63,6 +63,8 @@
@emph{unless} another duplicate symbol of the
same@tie{}@code{@@name} is found with a different @code{@@src},
in which case all symbols will be returned.
+ An exception to this rule is made when both symbols lack a @code{@@src},
+ meaning that they are both defined in the same package.
This allows sloppy comparison on concatenated symbol tables before
tidying it up.
@@ -94,7 +96,11 @@
<sequence select="if ( count( $srcs ) gt 1 ) then
current-group()
else
- ()" />
+ if ( ( $srcs[ 1 ] = '.' )
+ and ( count( current-group() ) gt 1 ) ) then
+ current-group()
+ else
+ ()" />
</for-each-group>
</function>