Skip to content

Commit ce4b9c8

Browse files
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>
1 parent e9287ea commit ce4b9c8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doc/c-api/long.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
9494
ignored. If there are no digits or *str* is not NULL-terminated following the
9595
digits and trailing whitespace, :exc:`ValueError` will be raised.
9696
97-
.. seealso:: Python methods :meth:`int.to_bytes` and :meth:`int.from_bytes`
98-
to convert a :c:type:`PyLongObject` to/from an array of bytes in base
99-
``256``. You can call those from C using :c:func:`PyObject_CallMethod`.
97+
.. seealso:: :c:func:`PyLong_AsNativeBytes()` and
98+
:c:func:`PyLong_FromNativeBytes()` functions can be used to convert
99+
a :c:type:`PyLongObject` to/from an array of bytes in base ``256``.
100100
101101
102102
.. c:function:: PyObject* PyLong_FromUnicodeObject(PyObject *u, int base)

0 commit comments

Comments
 (0)