Commits

Anonymous committed 2964c27

Nicer solution for the C++ fix

  • Participants
  • Parent commits fc2081b

Comments (0)

Files changed (1)

File sphinx/domains/cpp.py

         signode['first'] = (not self.names)
         self.state.document.note_explicit_target(signode)
 
-        # XXX: why is objtype function?  How to get to func?
-        typ = self.objtype
-        if typ == 'function':
-            typ = 'func'
         self.env.domaindata['cpp']['objects'].setdefault(name,
-            (self.env.docname, typ, theid))
+            (self.env.docname, self.objtype, theid))
 
         indextext = self.get_index_text(name)
         if indextext:
             if name not in self.data['objects']:
                 return None
             obj = self.data['objects'][name]
-            if obj[1] != typ:
+            if obj[1] not in self.objtypes_for_role(typ):
                 return None
             return make_refnode(builder, fromdocname, obj[0], obj[2],
                                 contnode, name)