From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 12 Nov 2025 09:56:47 +0000 (+0100) Subject: [3.14] gh-141370: document undefined behavior of Py_ABS() (GH-141439) (GH-141454) X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b883ad17cd1d6cc9464299c951bb779e88339775;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-141370: document undefined behavior of Py_ABS() (GH-141439) (GH-141454) (cherry picked from commit 20f53df07d42c495a08c73a3d54b8dd9098a62f0) Co-authored-by: Sergey B Kirpichev --- diff --git a/Doc/c-api/intro.rst b/Doc/c-api/intro.rst index 096e4d34f664..04c4d7284ad4 100644 --- a/Doc/c-api/intro.rst +++ b/Doc/c-api/intro.rst @@ -121,6 +121,10 @@ complete listing. Return the absolute value of ``x``. + If the result cannot be represented (for example, if ``x`` has + :c:macro:`!INT_MIN` value for :c:expr:`int` type), the behavior is + undefined. + .. versionadded:: 3.3 .. c:macro:: Py_ALWAYS_INLINE