UBUNTU: SAUCE: Documentation: import error c_funcptr_sig_re, c_sig_re (sphinx-doc/sphinx@0f49e30c)
Extension error: Could not import extension linuxdoc.cdomain .. \ (exception: cannot import name 'c_funcptr_sig_re' from .. Issue: `sphinx-doc/sphinx#7421`_ .. _0f49e30c: https://github.com/sphinx-doc/sphinx/commit/0f49e30c51b5cc5055cda5b4b294c2dd9d1df573#r38750737 .. _sphinx-doc/sphinx#7421: https://github.com/sphinx-doc/sphinx/issues/7421 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Link: https://github.com/return42/linuxdoc/commit/48f09de2aff80169b7b9be5b0f2431ad8954e5cc Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
This commit is contained in:
committed by
Paolo Pisati
parent
cf49a654fd
commit
dfc4b452db
@@ -37,12 +37,29 @@ from docutils.parsers.rst import directives
|
||||
|
||||
import sphinx
|
||||
from sphinx import addnodes
|
||||
from sphinx.domains.c import c_funcptr_sig_re, c_sig_re
|
||||
from sphinx.domains.c import CObject as Base_CObject
|
||||
from sphinx.domains.c import CDomain as Base_CDomain
|
||||
from itertools import chain
|
||||
import re
|
||||
|
||||
# fixes https://github.com/sphinx-doc/sphinx/commit/0f49e30c51b5cc5055cda5b4b294c2dd9d1df573#r38750737
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
c_sig_re = re.compile(
|
||||
r'''^([^(]*?) # return type
|
||||
([\w:.]+) \s* # thing name (colon allowed for C++)
|
||||
(?: \((.*)\) )? # optionally arguments
|
||||
(\s+const)? $ # const specifier
|
||||
''', re.VERBOSE)
|
||||
|
||||
c_funcptr_sig_re = re.compile(
|
||||
r'''^([^(]+?) # return type
|
||||
(\( [^()]+ \)) \s* # name in parentheses
|
||||
\( (.*) \) # arguments
|
||||
(\s+const)? $ # const specifier
|
||||
''', re.VERBOSE)
|
||||
# pylint: enable=invalid-name
|
||||
|
||||
__version__ = '1.1'
|
||||
|
||||
# Get Sphinx version
|
||||
|
||||
Reference in New Issue
Block a user