Fix tracebacks occurring for duplicate C++ domain objects.

This commit is contained in:
Georg Brandl 2011-01-06 12:28:55 +01:00
parent c873409943
commit 81ecbc19b0
3 changed files with 21 additions and 7 deletions

View File

@ -1,6 +1,8 @@
Release 1.0.7 (in development)
==============================
* Fix tracebacks occurring for duplicate C++ domain objects.
Release 1.0.6 (Jan 04, 2011)
============================

View File

@ -161,7 +161,7 @@ class DefExpr(object):
return unicode(self).encode('utf-8')
def __repr__(self):
return '<defexpr %s>' % self
return '<%s %s>' % (self.__class__.__name__, self)
class PrimaryDefExpr(DefExpr):
@ -818,6 +818,7 @@ class CPPObject(ObjectDescription):
def add_target_and_index(self, sigobj, sig, signode):
theid = sigobj.get_id()
name = unicode(sigobj.name)
if theid not in self.state.document.ids:
signode['names'].append(theid)
signode['ids'].append(theid)
signode['first'] = (not self.names)

View File

@ -161,3 +161,14 @@ User markup
Referencing :userdescrole:`myobj`.
CPP domain
==========
.. cpp:class:: n::Array<T,d>
.. cpp:function:: T& operator[]( unsigned j )
.. cpp:function:: const T& operator[]( unsigned j ) const