From b3108306cda69378bbaca8e2ee968644d45d264e Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 22 Sep 2011 10:23:54 +0200 Subject: [PATCH] Fix #677: allow multiple signatures in C++ domain directives. --- CHANGES | 2 ++ sphinx/domains/cpp.py | 2 +- tests/root/objects.txt | 4 +--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index c7b1d45e4..ddb8dea33 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ Release 1.0.8 (in development) ============================== +* #677: Fix parsing of multiple signatures in C++ domain. + * #637: Ignore Emacs lock files when looking for source files. * #544: Allow .pyw extension for importable modules in autodoc. diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index f07037e45..dac0106bb 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -122,7 +122,7 @@ class DefExpr(object): return False try: for key, value in self.__dict__.iteritems(): - if value != getattr(other, value): + if value != getattr(other, key): return False except AttributeError: return False diff --git a/tests/root/objects.txt b/tests/root/objects.txt index 51ecee911..533bdae3e 100644 --- a/tests/root/objects.txt +++ b/tests/root/objects.txt @@ -169,6 +169,4 @@ CPP domain .. cpp:class:: n::Array .. cpp:function:: T& operator[]( unsigned j ) - - .. cpp:function:: const T& operator[]( unsigned j ) const - + const T& operator[]( unsigned j ) const