From 722e027150cf787cb2eada154f5151fa77d5da18 Mon Sep 17 00:00:00 2001 From: yuki Date: Wed, 29 Mar 2023 03:20:02 +0000 Subject: DOC: Fix incorrect operators for member access in `array.rst` Operators should be `->`, not `.`, for here both `obj` are pointers of C-struct. --- doc/source/reference/c-api/array.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/source/reference/c-api') diff --git a/doc/source/reference/c-api/array.rst b/doc/source/reference/c-api/array.rst index ed6d6fb6b..9abaaddf5 100644 --- a/doc/source/reference/c-api/array.rst +++ b/doc/source/reference/c-api/array.rst @@ -3351,7 +3351,7 @@ Memory management .. c:function:: int PyArray_ResolveWritebackIfCopy(PyArrayObject* obj) - If ``obj.flags`` has :c:data:`NPY_ARRAY_WRITEBACKIFCOPY`, this function + If ``obj->flags`` has :c:data:`NPY_ARRAY_WRITEBACKIFCOPY`, this function clears the flags, `DECREF` s `obj->base` and makes it writeable, and sets ``obj->base`` to NULL. It then copies ``obj->data`` to `obj->base->data`, and returns the error state of @@ -3583,7 +3583,7 @@ Miscellaneous Macros .. c:function:: void PyArray_DiscardWritebackIfCopy(PyObject* obj) - If ``obj.flags`` has :c:data:`NPY_ARRAY_WRITEBACKIFCOPY`, this function + If ``obj->flags`` has :c:data:`NPY_ARRAY_WRITEBACKIFCOPY`, this function clears the flags, `DECREF` s `obj->base` and makes it writeable, and sets ``obj->base`` to NULL. In contrast to :c:func:`PyArray_DiscardWritebackIfCopy` it makes no attempt -- cgit v1.2.1