Documentation: fixed "template<class T> const T" case for ".. ocv:function::" macro
This commit is contained in:
parent
d6e3ccc1b2
commit
6168eaf745
16
doc/ocv.py
16
doc/ocv.py
@ -561,6 +561,18 @@ class ConstDefExpr(WrappingDefExpr):
|
|||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
return (self.prefix and u'const %s' or u'%s const') % self.typename
|
return (self.prefix and u'const %s' or u'%s const') % self.typename
|
||||||
|
|
||||||
|
class ConstTemplateDefExpr(WrappingDefExpr):
|
||||||
|
|
||||||
|
def __init__(self, typename, prefix=False):
|
||||||
|
WrappingDefExpr.__init__(self, typename)
|
||||||
|
self.prefix = prefix
|
||||||
|
|
||||||
|
def get_id(self):
|
||||||
|
return self.typename.get_id() + u'C'
|
||||||
|
|
||||||
|
def __unicode__(self):
|
||||||
|
return (self.prefix and u'const %s' or u'%s const') % self.typename
|
||||||
|
|
||||||
|
|
||||||
class CastOpDefExpr(PrimaryDefExpr):
|
class CastOpDefExpr(PrimaryDefExpr):
|
||||||
|
|
||||||
@ -933,9 +945,11 @@ class DefinitionParser(object):
|
|||||||
else:
|
else:
|
||||||
rv = PathDefExpr(result)
|
rv = PathDefExpr(result)
|
||||||
is_const = self._peek_const(modifiers)
|
is_const = self._peek_const(modifiers)
|
||||||
|
if is_const:
|
||||||
|
rv = ConstDefExpr(rv, prefix=True)
|
||||||
if modifiers:
|
if modifiers:
|
||||||
rv = ModifierDefExpr(rv, modifiers)
|
rv = ModifierDefExpr(rv, modifiers)
|
||||||
return self._attach_crefptr(rv, is_const)
|
return self._attach_crefptr(rv, False)
|
||||||
|
|
||||||
def _parse_default_expr(self):
|
def _parse_default_expr(self):
|
||||||
self.skip_ws()
|
self.skip_ws()
|
||||||
|
Loading…
Reference in New Issue
Block a user