Skip to content

Commit a808fd3

Browse files
committed
Deploying to gh-pages from @ a4bf1c8 🚀
1 parent f8020c5 commit a808fd3

File tree

527 files changed

+1008
-1204
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

527 files changed

+1008
-1204
lines changed

.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 5ed0fcad641de016763490be4730d71e
3+
config: 7da45cf1ce1309d0a95355fe993d8696
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

_sources/c-api/conversion.rst.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,42 @@ The return value (*rv*) for these functions should be interpreted as follows:
4848
4949
The following functions provide locale-independent string to number conversions.
5050
51+
.. c:function:: unsigned long PyOS_strtoul(const char *str, char **ptr, int base)
52+
53+
Convert the initial part of the string in ``str`` to an :c:expr:`unsigned
54+
long` value according to the given ``base``, which must be between ``2`` and
55+
``36`` inclusive, or be the special value ``0``.
56+
57+
Leading white space and case of characters are ignored. If ``base`` is zero
58+
it looks for a leading ``0b``, ``0o`` or ``0x`` to tell which base. If
59+
these are absent it defaults to ``10``. Base must be 0 or between 2 and 36
60+
(inclusive). If ``ptr`` is non-``NULL`` it will contain a pointer to the
61+
end of the scan.
62+
63+
If the converted value falls out of range of corresponding return type,
64+
range error occurs (:c:data:`errno` is set to :c:macro:`!ERANGE`) and
65+
:c:macro:`!ULONG_MAX` is returned. If no conversion can be performed, ``0``
66+
is returned.
67+
68+
See also the Unix man page :manpage:`strtoul(3)`.
69+
70+
.. versionadded:: 3.2
71+
72+
73+
.. c:function:: long PyOS_strtol(const char *str, char **ptr, int base)
74+
75+
Convert the initial part of the string in ``str`` to an :c:expr:`long` value
76+
according to the given ``base``, which must be between ``2`` and ``36``
77+
inclusive, or be the special value ``0``.
78+
79+
Same as :c:func:`PyOS_strtoul`, but return a :c:expr:`long` value instead
80+
and :c:macro:`LONG_MAX` on overflows.
81+
82+
See also the Unix man page :manpage:`strtol(3)`.
83+
84+
.. versionadded:: 3.2
85+
86+
5187
.. c:function:: double PyOS_string_to_double(const char *s, char **endptr, PyObject *overflow_exception)
5288
5389
Convert a string ``s`` to a :c:expr:`double`, raising a Python

0 commit comments

Comments
 (0)