summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authortakanori-pskq <takanori17h@gmail.com>2020-10-04 21:39:30 +0900
committertakanori-pskq <takanori17h@gmail.com>2020-10-04 23:12:12 +0900
commitd84ff867373b60927d0dc3ff511a22828a9ac8dc (patch)
tree720a2fe9d0f2ff63860637e50ab0d8541e6c171c /doc/source
parent88eda2f2f430e2f3b7e580fe38ac31e4c5fac942 (diff)
downloadnumpy-d84ff867373b60927d0dc3ff511a22828a9ac8dc.tar.gz
DOC: Fix the references for macros
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/reference/arrays.interface.rst8
-rw-r--r--doc/source/reference/c-api/array.rst8
-rw-r--r--doc/source/reference/c-api/config.rst6
3 files changed, 17 insertions, 5 deletions
diff --git a/doc/source/reference/arrays.interface.rst b/doc/source/reference/arrays.interface.rst
index 73e4aef0c..6d12cf999 100644
--- a/doc/source/reference/arrays.interface.rst
+++ b/doc/source/reference/arrays.interface.rst
@@ -231,10 +231,10 @@ as::
The flags member may consist of 5 bits showing how the data should be
interpreted and one bit showing how the Interface should be
-interpreted. The data-bits are :const:`CONTIGUOUS` (0x1),
-:const:`FORTRAN` (0x2), :const:`ALIGNED` (0x100), :const:`NOTSWAPPED`
-(0x200), and :const:`WRITEABLE` (0x400). A final flag
-:const:`ARR_HAS_DESCR` (0x800) indicates whether or not this structure
+interpreted. The data-bits are :c:macro:`NPY_ARRAY_C_CONTIGUOUS` (0x1),
+:c:macro:`NPY_ARRAY_F_CONTIGUOUS` (0x2), :c:macro:`NPY_ARRAY_ALIGNED` (0x100),
+:c:macro:`NPY_ARRAY_NOTSWAPPED` (0x200), and :c:macro:`NPY_ARRAY_WRITEABLE` (0x400). A final flag
+:c:macro:`NPY_ARR_HAS_DESCR` (0x800) indicates whether or not this structure
has the arrdescr field. The field should not be accessed unless this
flag is present.
diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst
index cfe4d2d51..9fe45d2de 100644
--- a/doc/source/reference/c-api/array.rst
+++ b/doc/source/reference/c-api/array.rst
@@ -3259,6 +3259,8 @@ Memory management
:c:data:`NPY_USE_PYMEM` is 0, if :c:data:`NPY_USE_PYMEM` is 1, then
the Python memory allocator is used.
+ .. c:macro:: NPY_USE_PYMEM
+
.. c:function:: int PyArray_ResolveWritebackIfCopy(PyArrayObject* obj)
If ``obj.flags`` has :c:data:`NPY_ARRAY_WRITEBACKIFCOPY` or (deprecated)
@@ -3289,9 +3291,13 @@ be accomplished using two groups of macros. Typically, if one macro in
a group is used in a code block, all of them must be used in the same
code block. Currently, :c:data:`NPY_ALLOW_THREADS` is defined to the
python-defined :c:data:`WITH_THREADS` constant unless the environment
-variable :c:data:`NPY_NOSMP` is set in which case
+variable ``NPY_NOSMP`` is set in which case
:c:data:`NPY_ALLOW_THREADS` is defined to be 0.
+.. c:macro:: NPY_ALLOW_THREADS
+
+.. c:macro:: WITH_THREADS
+
Group 1
"""""""
diff --git a/doc/source/reference/c-api/config.rst b/doc/source/reference/c-api/config.rst
index c3e2c98af..5fdbc0ff1 100644
--- a/doc/source/reference/c-api/config.rst
+++ b/doc/source/reference/c-api/config.rst
@@ -102,6 +102,12 @@ Platform information
One of :c:data:`NPY_CPU_BIG`, :c:data:`NPY_CPU_LITTLE`,
or :c:data:`NPY_CPU_UNKNOWN_ENDIAN`.
+ .. c:macro:: NPY_CPU_BIG
+
+ .. c:macro:: NPY_CPU_LITTLE
+
+ .. c:macro:: NPY_CPU_UNKNOWN_ENDIAN
+
Compiler directives
-------------------