mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix tracebacks occurring for duplicate C++ domain objects.
This commit is contained in:
parent
c873409943
commit
81ecbc19b0
2
CHANGES
2
CHANGES
@ -1,6 +1,8 @@
|
|||||||
Release 1.0.7 (in development)
|
Release 1.0.7 (in development)
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
* Fix tracebacks occurring for duplicate C++ domain objects.
|
||||||
|
|
||||||
|
|
||||||
Release 1.0.6 (Jan 04, 2011)
|
Release 1.0.6 (Jan 04, 2011)
|
||||||
============================
|
============================
|
||||||
|
@ -161,7 +161,7 @@ class DefExpr(object):
|
|||||||
return unicode(self).encode('utf-8')
|
return unicode(self).encode('utf-8')
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '<defexpr %s>' % self
|
return '<%s %s>' % (self.__class__.__name__, self)
|
||||||
|
|
||||||
|
|
||||||
class PrimaryDefExpr(DefExpr):
|
class PrimaryDefExpr(DefExpr):
|
||||||
@ -818,13 +818,14 @@ class CPPObject(ObjectDescription):
|
|||||||
def add_target_and_index(self, sigobj, sig, signode):
|
def add_target_and_index(self, sigobj, sig, signode):
|
||||||
theid = sigobj.get_id()
|
theid = sigobj.get_id()
|
||||||
name = unicode(sigobj.name)
|
name = unicode(sigobj.name)
|
||||||
signode['names'].append(theid)
|
if theid not in self.state.document.ids:
|
||||||
signode['ids'].append(theid)
|
signode['names'].append(theid)
|
||||||
signode['first'] = (not self.names)
|
signode['ids'].append(theid)
|
||||||
self.state.document.note_explicit_target(signode)
|
signode['first'] = (not self.names)
|
||||||
|
self.state.document.note_explicit_target(signode)
|
||||||
|
|
||||||
self.env.domaindata['cpp']['objects'].setdefault(name,
|
self.env.domaindata['cpp']['objects'].setdefault(name,
|
||||||
(self.env.docname, self.objtype, theid))
|
(self.env.docname, self.objtype, theid))
|
||||||
|
|
||||||
indextext = self.get_index_text(name)
|
indextext = self.get_index_text(name)
|
||||||
if indextext:
|
if indextext:
|
||||||
|
@ -161,3 +161,14 @@ User markup
|
|||||||
|
|
||||||
|
|
||||||
Referencing :userdescrole:`myobj`.
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user