Anonymous committed 2964c27

Nicer solution for the C++ fix

  • Participants
  • Parent commits fc2081b

Comments (0)

Files changed (1)

File sphinx/domains/

         signode['first'] = (not self.names)
-        # XXX: why is objtype function?  How to get to func?
-        typ = self.objtype
-        if typ == 'function':
-            typ = 'func'
-            (self.env.docname, typ, theid))
+            (self.env.docname, self.objtype, theid))
         indextext = self.get_index_text(name)
         if indextext:
             if name not in['objects']:
                 return None
             obj =['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)