https://github.com/python/cpython/commit/f2b9a74cf6fea5e9cff3c753bbe07b213c1d1380 commit: f2b9a74cf6fea5e9cff3c753bbe07b213c1d1380 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: encukou <[email protected]> date: 2026-01-22T13:30:14+01:00 summary:
[3.14] gh-141004: Mark up constants for `PyOS_double_to_string` (GH-143867) (GH-144146) This ensures they show up as C macros in search and the Sphinx inventory. (cherry picked from commit fb690c38cafb15e4ccddc52aba37f9470ce201a0) Co-authored-by: Petr Viktorin <[email protected]> files: M Doc/c-api/conversion.rst diff --git a/Doc/c-api/conversion.rst b/Doc/c-api/conversion.rst index 977406eb4d4222..794e45af66316f 100644 --- a/Doc/c-api/conversion.rst +++ b/Doc/c-api/conversion.rst @@ -130,6 +130,8 @@ The following functions provide locale-independent string to number conversions. *flags* can be zero or more of the following values or-ed together: + .. c:namespace:: NULL + .. c:macro:: Py_DTSF_SIGN Always precede the returned string with a sign @@ -151,9 +153,21 @@ The following functions provide locale-independent string to number conversions. .. versionadded:: 3.11 - If *ptype* is non-``NULL``, then the value it points to will be set to one of - ``Py_DTST_FINITE``, ``Py_DTST_INFINITE``, or ``Py_DTST_NAN``, signifying that - *val* is a finite number, an infinite number, or not a number, respectively. + If *ptype* is non-``NULL``, then the value it points to will be set to one + of the following constants depending on the type of *val*: + + .. list-table:: + :header-rows: 1 + :align: left + + * - *\*ptype* + - type of *val* + * - .. c:macro:: Py_DTST_FINITE + - finite number + * - .. c:macro:: Py_DTST_INFINITE + - infinite number + * - .. c:macro:: Py_DTST_NAN + - not a number The return value is a pointer to *buffer* with the converted string or ``NULL`` if the conversion failed. The caller is responsible for freeing the _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
