Sphinx 3 introduces new C domain directives. Start using c:enumerator
for enum values instead of c:macro.
---
hawkmoth/util/docstr.py | 4 ++--
test/enum.rst | 4 ++--
test/example-40-enum.rst | 4 ++--
test/typedef-enum.rst | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/hawkmoth/util/docstr.py b/hawkmoth/util/docstr.py
index 2e6572f92963..c6c2ff533c39 100644
--- a/hawkmoth/util/docstr.py
+++ b/hawkmoth/util/docstr.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2017 Jani Nikula <jani@xxxxxxxxxx>
+# Copyright (c) 2016-2020 Jani Nikula <jani@xxxxxxxxxx>
# Copyright (c) 2018-2019 Bruno Santos <brunomanuelsantos@xxxxxxxxxxxxxxxxxx>
# Licensed under the terms of BSD 2-Clause, see LICENSE for details.
"""
@@ -31,7 +31,7 @@ _doc_fmt = {
Type.TEXT: (0, '\n{text}\n'),
Type.VAR: (1, '\n.. c:var:: {ttype} {name}\n\n{text}\n'),
Type.TYPE: (1, '\n.. c:type:: {name}\n\n{text}\n'),
- Type.ENUM_VAL: (1, '\n.. c:macro:: {name}\n\n{text}\n'),
+ Type.ENUM_VAL: (1, '\n.. c:enumerator:: {name}\n\n{text}\n'),
Type.MEMBER: (1, '\n.. c:member:: {ttype} {name}\n\n{text}\n'),
Type.MACRO: (1, '\n.. c:macro:: {name}\n\n{text}\n'),
Type.MACRO_FUNC: (1, '\n.. c:function:: {name}({args})\n\n{text}\n'),
diff --git a/test/enum.rst b/test/enum.rst
index a7a8ceda363f..5d939ef77be3 100644
--- a/test/enum.rst
+++ b/test/enum.rst
@@ -4,12 +4,12 @@
Enum doc.
- .. c:macro:: bar
+ .. c:enumerator:: bar
Enumeration comment.
- .. c:macro:: baz
+ .. c:enumerator:: baz
Another.
diff --git a/test/example-40-enum.rst b/test/example-40-enum.rst
index 75000b3feab7..a1d42ca86b9e 100644
--- a/test/example-40-enum.rst
+++ b/test/example-40-enum.rst
@@ -4,12 +4,12 @@
Frobnication modes for :c:func:`frob`.
- .. c:macro:: MODE_PRIMARY
+ .. c:enumerator:: MODE_PRIMARY
The primary frobnication mode.
- .. c:macro:: MODE_SECONDARY
+ .. c:enumerator:: MODE_SECONDARY
The secondary frobnication mode.
diff --git a/test/typedef-enum.rst b/test/typedef-enum.rst
index 44ef1a25ef89..56c9c8d06c94 100644
--- a/test/typedef-enum.rst
+++ b/test/typedef-enum.rst
@@ -4,7 +4,7 @@
named typedeffed enum
- .. c:macro:: damn
+ .. c:enumerator:: damn
named enumeration
@@ -14,7 +14,7 @@
unnamed typedeffed enum
- .. c:macro:: shit
+ .. c:enumerator:: shit
unnamed enumeration
--
2.20.1