File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 11
11
For user documentation see :ref:`customized-c-domain`.
12
12
"""
13
13
14
+ import re
15
+
14
16
from docutils import nodes
15
17
from docutils .parsers .rst import directives
16
18
17
19
import sphinx
18
20
from sphinx import addnodes
19
21
from sphinx .locale import _
20
- from sphinx .domains .c import c_funcptr_sig_re , c_sig_re
21
22
from sphinx .domains .c import CObject as Base_CObject
22
23
from sphinx .domains .c import CDomain as Base_CDomain
23
24
24
- __version__ = '1.0'
25
+ # fixes https://github.com/sphinx-doc/sphinx/commit/0f49e30c51b5cc5055cda5b4b294c2dd9d1df573#r38750737
26
+
27
+ # pylint: disable=invalid-name
28
+ c_sig_re = re .compile (
29
+ r'''^([^(]*?) # return type
30
+ ([\w:.]+) \s* # thing name (colon allowed for C++)
31
+ (?: \((.*)\) )? # optionally arguments
32
+ (\s+const)? $ # const specifier
33
+ ''' , re .VERBOSE )
34
+
35
+ c_funcptr_sig_re = re .compile (
36
+ r'''^([^(]+?) # return type
37
+ (\( [^()]+ \)) \s* # name in parentheses
38
+ \( (.*) \) # arguments
39
+ (\s+const)? $ # const specifier
40
+ ''' , re .VERBOSE )
41
+ # pylint: enable=invalid-name
42
+
43
+ __version__ = '1.0.1'
25
44
26
45
# Get Sphinx version
27
46
major , minor , patch = sphinx .version_info [:3 ] # pylint: disable=invalid-name
You can’t perform that action at this time.
0 commit comments