summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey B Kirpichev <skirpichev@gmail.com>2024-08-17 09:13:31 (GMT)
committerGitHub <noreply@github.com>2024-08-17 09:13:31 (GMT)
commitce4b9c8464706a58d0c98c2b0deeec07e7496ccc (patch)
treeebfeaf711d4423c6957f8b2bb3424dc87d21b879
parente9287ea426e8e1b930f1c3f0cb949a1416d29090 (diff)
downloadcpython-ce4b9c8464706a58d0c98c2b0deeec07e7496ccc.zip
cpython-ce4b9c8464706a58d0c98c2b0deeec07e7496ccc.tar.gz
cpython-ce4b9c8464706a58d0c98c2b0deeec07e7496ccc.tar.bz2
gh-121477: mention new PyLong_*Bytes() functions in PyLong_FromString() (#121478)
* gh-121477: mention new PyLong_*Bytes() functions in PyLong_FromString() * Update Doc/c-api/long.rst --------- Co-authored-by: Kumar Aditya <kumaraditya@python.org>
-rw-r--r--Doc/c-api/long.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst
index 9f2c48d..c7c6fe9 100644
--- a/Doc/c-api/long.rst
+++ b/Doc/c-api/long.rst
@@ -94,9 +94,9 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
ignored. If there are no digits or *str* is not NULL-terminated following the
digits and trailing whitespace, :exc:`ValueError` will be raised.
- .. seealso:: Python methods :meth:`int.to_bytes` and :meth:`int.from_bytes`
- to convert a :c:type:`PyLongObject` to/from an array of bytes in base
- ``256``. You can call those from C using :c:func:`PyObject_CallMethod`.
+ .. seealso:: :c:func:`PyLong_AsNativeBytes()` and
+ :c:func:`PyLong_FromNativeBytes()` functions can be used to convert
+ a :c:type:`PyLongObject` to/from an array of bytes in base ``256``.
.. c:function:: PyObject* PyLong_FromUnicodeObject(PyObject *u, int base)