Skip to content

Commit c317cf5

Browse files
[3.13] gh-141370: document undefined behavior of Py_ABS() (GH-141439) (GH-141455)
(cherry picked from commit 20f53df) Co-authored-by: Sergey B Kirpichev <[email protected]>
1 parent 51c60f3 commit c317cf5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/c-api/intro.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ complete listing.
133133
134134
Return the absolute value of ``x``.
135135

136+
If the result cannot be represented (for example, if ``x`` has
137+
:c:macro:`!INT_MIN` value for :c:expr:`int` type), the behavior is
138+
undefined.
139+
136140
.. versionadded:: 3.3
137141

138142
.. c:macro:: Py_ALWAYS_INLINE

0 commit comments

Comments
 (0)