From e2ae287f1c22af41cfbc8db312c0d1f3c88cce6c Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Sat, 14 Aug 2021 16:03:54 +0200 Subject: [PATCH] C, add fract and accum --- sphinx/domains/c.py | 2 +- tests/test_domain_c.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py index ff592d0de..125bf067b 100644 --- a/sphinx/domains/c.py +++ b/sphinx/domains/c.py @@ -111,7 +111,7 @@ _simple_type_sepcifiers_re = re.compile(r"""(?x) |__float80|_Float64x|__float128|_Float128|__ibm128 |__fp16 # Fixed-point, extension - |(_Sat\s+)?((signed|unsigned)\s+)?((short|long|long\s+long)\s+)?(_Fract|_Accum) + |(_Sat\s+)?((signed|unsigned)\s+)?((short|long|long\s+long)\s+)?(_Fract|fract|_Accum|accum) # Integer types that could be prefixes of the previous ones # --------------------------------------------------------- |((signed|unsigned)\s+)?(short|long\s+long|long) diff --git a/tests/test_domain_c.py b/tests/test_domain_c.py index d8429861a..b910a2ec8 100644 --- a/tests/test_domain_c.py +++ b/tests/test_domain_c.py @@ -318,7 +318,7 @@ def test_domain_c_ast_fundamental_types(): # ----------------------------- # https://gcc.gnu.org/onlinedocs/gcc/Fixed-Point.html#Fixed-Point for sat in ('', '_Sat '): - for t in ('_Fract', '_Accum'): + for t in ('_Fract', 'fract', '_Accum', 'accum'): for size in ('short ', '', 'long ', 'long long '): for tt in signed(size + t): yield sat + tt