bpo-27961: Remove leftovers from the times when long long wasn't required (GH-15388)
This commit is contained in:
parent
c4106af38b
commit
a38e9d1399
|
@ -36,9 +36,9 @@ defined:
|
||||||
+-----------+--------------------+-------------------+-----------------------+-------+
|
+-----------+--------------------+-------------------+-----------------------+-------+
|
||||||
| ``'L'`` | unsigned long | int | 4 | |
|
| ``'L'`` | unsigned long | int | 4 | |
|
||||||
+-----------+--------------------+-------------------+-----------------------+-------+
|
+-----------+--------------------+-------------------+-----------------------+-------+
|
||||||
| ``'q'`` | signed long long | int | 8 | \(2) |
|
| ``'q'`` | signed long long | int | 8 | |
|
||||||
+-----------+--------------------+-------------------+-----------------------+-------+
|
+-----------+--------------------+-------------------+-----------------------+-------+
|
||||||
| ``'Q'`` | unsigned long long | int | 8 | \(2) |
|
| ``'Q'`` | unsigned long long | int | 8 | |
|
||||||
+-----------+--------------------+-------------------+-----------------------+-------+
|
+-----------+--------------------+-------------------+-----------------------+-------+
|
||||||
| ``'f'`` | float | float | 4 | |
|
| ``'f'`` | float | float | 4 | |
|
||||||
+-----------+--------------------+-------------------+-----------------------+-------+
|
+-----------+--------------------+-------------------+-----------------------+-------+
|
||||||
|
@ -57,13 +57,6 @@ Notes:
|
||||||
|
|
||||||
.. deprecated-removed:: 3.3 4.0
|
.. deprecated-removed:: 3.3 4.0
|
||||||
|
|
||||||
(2)
|
|
||||||
The ``'q'`` and ``'Q'`` type codes are available only if
|
|
||||||
the platform C compiler used to build Python supports C :c:type:`long long`,
|
|
||||||
or, on Windows, :c:type:`__int64`.
|
|
||||||
|
|
||||||
.. versionadded:: 3.3
|
|
||||||
|
|
||||||
The actual representation of values is determined by the machine architecture
|
The actual representation of values is determined by the machine architecture
|
||||||
(strictly speaking, by the C implementation). The actual size can be accessed
|
(strictly speaking, by the C implementation). The actual size can be accessed
|
||||||
through the :attr:`itemsize` attribute.
|
through the :attr:`itemsize` attribute.
|
||||||
|
|
|
@ -44,8 +44,8 @@ by defining the relevant size and offset types as 64-bit values. Such files are
|
||||||
sometimes referred to as :dfn:`large files`.
|
sometimes referred to as :dfn:`large files`.
|
||||||
|
|
||||||
Large file support is enabled in Python when the size of an :c:type:`off_t` is
|
Large file support is enabled in Python when the size of an :c:type:`off_t` is
|
||||||
larger than a :c:type:`long` and the :c:type:`long long` type is available and is
|
larger than a :c:type:`long` and the :c:type:`long long` is at least as large
|
||||||
at least as large as an :c:type:`off_t`.
|
as an :c:type:`off_t`.
|
||||||
It may be necessary to configure and compile Python with certain compiler flags
|
It may be necessary to configure and compile Python with certain compiler flags
|
||||||
to enable this mode. For example, it is enabled by default with recent versions
|
to enable this mode. For example, it is enabled by default with recent versions
|
||||||
of Irix, but with Solaris 2.6 and 2.7 you need to do something like::
|
of Irix, but with Solaris 2.6 and 2.7 you need to do something like::
|
||||||
|
|
|
@ -197,44 +197,44 @@ platform-dependent.
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``c`` | :c:type:`char` | bytes of length 1 | 1 | |
|
| ``c`` | :c:type:`char` | bytes of length 1 | 1 | |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``b`` | :c:type:`signed char` | integer | 1 | \(1),\(3) |
|
| ``b`` | :c:type:`signed char` | integer | 1 | \(1), \(2) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``B`` | :c:type:`unsigned char` | integer | 1 | \(3) |
|
| ``B`` | :c:type:`unsigned char` | integer | 1 | \(2) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``?`` | :c:type:`_Bool` | bool | 1 | \(1) |
|
| ``?`` | :c:type:`_Bool` | bool | 1 | \(1) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``h`` | :c:type:`short` | integer | 2 | \(3) |
|
| ``h`` | :c:type:`short` | integer | 2 | \(2) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``H`` | :c:type:`unsigned short` | integer | 2 | \(3) |
|
| ``H`` | :c:type:`unsigned short` | integer | 2 | \(2) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``i`` | :c:type:`int` | integer | 4 | \(3) |
|
| ``i`` | :c:type:`int` | integer | 4 | \(2) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``I`` | :c:type:`unsigned int` | integer | 4 | \(3) |
|
| ``I`` | :c:type:`unsigned int` | integer | 4 | \(2) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``l`` | :c:type:`long` | integer | 4 | \(3) |
|
| ``l`` | :c:type:`long` | integer | 4 | \(2) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``L`` | :c:type:`unsigned long` | integer | 4 | \(3) |
|
| ``L`` | :c:type:`unsigned long` | integer | 4 | \(2) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``q`` | :c:type:`long long` | integer | 8 | \(2), \(3) |
|
| ``q`` | :c:type:`long long` | integer | 8 | \(2) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``Q`` | :c:type:`unsigned long | integer | 8 | \(2), \(3) |
|
| ``Q`` | :c:type:`unsigned long | integer | 8 | \(2) |
|
||||||
| | long` | | | |
|
| | long` | | | |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``n`` | :c:type:`ssize_t` | integer | | \(4) |
|
| ``n`` | :c:type:`ssize_t` | integer | | \(3) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``N`` | :c:type:`size_t` | integer | | \(4) |
|
| ``N`` | :c:type:`size_t` | integer | | \(3) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``e`` | \(7) | float | 2 | \(5) |
|
| ``e`` | \(6) | float | 2 | \(4) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``f`` | :c:type:`float` | float | 4 | \(5) |
|
| ``f`` | :c:type:`float` | float | 4 | \(4) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``d`` | :c:type:`double` | float | 8 | \(5) |
|
| ``d`` | :c:type:`double` | float | 8 | \(4) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``s`` | :c:type:`char[]` | bytes | | |
|
| ``s`` | :c:type:`char[]` | bytes | | |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``p`` | :c:type:`char[]` | bytes | | |
|
| ``p`` | :c:type:`char[]` | bytes | | |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
| ``P`` | :c:type:`void \*` | integer | | \(6) |
|
| ``P`` | :c:type:`void \*` | integer | | \(5) |
|
||||||
+--------+--------------------------+--------------------+----------------+------------+
|
+--------+--------------------------+--------------------+----------------+------------+
|
||||||
|
|
||||||
.. versionchanged:: 3.3
|
.. versionchanged:: 3.3
|
||||||
|
@ -254,11 +254,6 @@ Notes:
|
||||||
standard mode, it is always represented by one byte.
|
standard mode, it is always represented by one byte.
|
||||||
|
|
||||||
(2)
|
(2)
|
||||||
The ``'q'`` and ``'Q'`` conversion codes are available in native mode only if
|
|
||||||
the platform C compiler supports C :c:type:`long long`, or, on Windows,
|
|
||||||
:c:type:`__int64`. They are always available in standard modes.
|
|
||||||
|
|
||||||
(3)
|
|
||||||
When attempting to pack a non-integer using any of the integer conversion
|
When attempting to pack a non-integer using any of the integer conversion
|
||||||
codes, if the non-integer has a :meth:`__index__` method then that method is
|
codes, if the non-integer has a :meth:`__index__` method then that method is
|
||||||
called to convert the argument to an integer before packing.
|
called to convert the argument to an integer before packing.
|
||||||
|
@ -266,26 +261,26 @@ Notes:
|
||||||
.. versionchanged:: 3.2
|
.. versionchanged:: 3.2
|
||||||
Use of the :meth:`__index__` method for non-integers is new in 3.2.
|
Use of the :meth:`__index__` method for non-integers is new in 3.2.
|
||||||
|
|
||||||
(4)
|
(3)
|
||||||
The ``'n'`` and ``'N'`` conversion codes are only available for the native
|
The ``'n'`` and ``'N'`` conversion codes are only available for the native
|
||||||
size (selected as the default or with the ``'@'`` byte order character).
|
size (selected as the default or with the ``'@'`` byte order character).
|
||||||
For the standard size, you can use whichever of the other integer formats
|
For the standard size, you can use whichever of the other integer formats
|
||||||
fits your application.
|
fits your application.
|
||||||
|
|
||||||
(5)
|
(4)
|
||||||
For the ``'f'``, ``'d'`` and ``'e'`` conversion codes, the packed
|
For the ``'f'``, ``'d'`` and ``'e'`` conversion codes, the packed
|
||||||
representation uses the IEEE 754 binary32, binary64 or binary16 format (for
|
representation uses the IEEE 754 binary32, binary64 or binary16 format (for
|
||||||
``'f'``, ``'d'`` or ``'e'`` respectively), regardless of the floating-point
|
``'f'``, ``'d'`` or ``'e'`` respectively), regardless of the floating-point
|
||||||
format used by the platform.
|
format used by the platform.
|
||||||
|
|
||||||
(6)
|
(5)
|
||||||
The ``'P'`` format character is only available for the native byte ordering
|
The ``'P'`` format character is only available for the native byte ordering
|
||||||
(selected as the default or with the ``'@'`` byte order character). The byte
|
(selected as the default or with the ``'@'`` byte order character). The byte
|
||||||
order character ``'='`` chooses to use little- or big-endian ordering based
|
order character ``'='`` chooses to use little- or big-endian ordering based
|
||||||
on the host system. The struct module does not interpret this as native
|
on the host system. The struct module does not interpret this as native
|
||||||
ordering, so the ``'P'`` format is not available.
|
ordering, so the ``'P'`` format is not available.
|
||||||
|
|
||||||
(7)
|
(6)
|
||||||
The IEEE 754 binary16 "half precision" type was introduced in the 2008
|
The IEEE 754 binary16 "half precision" type was introduced in the 2008
|
||||||
revision of the `IEEE 754 standard <ieee 754 standard_>`_. It has a sign
|
revision of the `IEEE 754 standard <ieee 754 standard_>`_. It has a sign
|
||||||
bit, a 5-bit exponent and 11-bit precision (with 10 bits explicitly stored),
|
bit, a 5-bit exponent and 11-bit precision (with 10 bits explicitly stored),
|
||||||
|
|
|
@ -295,7 +295,7 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
|
||||||
# define SIZEOF_FPOS_T 8
|
# define SIZEOF_FPOS_T 8
|
||||||
# define SIZEOF_HKEY 8
|
# define SIZEOF_HKEY 8
|
||||||
# define SIZEOF_SIZE_T 8
|
# define SIZEOF_SIZE_T 8
|
||||||
/* configure.ac defines HAVE_LARGEFILE_SUPPORT iff HAVE_LONG_LONG,
|
/* configure.ac defines HAVE_LARGEFILE_SUPPORT iff
|
||||||
sizeof(off_t) > sizeof(long), and sizeof(PY_LONG_LONG) >= sizeof(off_t).
|
sizeof(off_t) > sizeof(long), and sizeof(PY_LONG_LONG) >= sizeof(off_t).
|
||||||
On Win64 the second condition is not true, but if fpos_t replaces off_t
|
On Win64 the second condition is not true, but if fpos_t replaces off_t
|
||||||
then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64
|
then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64
|
||||||
|
|
|
@ -569,7 +569,7 @@
|
||||||
#undef HAVE_LANGINFO_H
|
#undef HAVE_LANGINFO_H
|
||||||
|
|
||||||
/* Defined to enable large file support when an off_t is bigger than a long
|
/* Defined to enable large file support when an off_t is bigger than a long
|
||||||
and long long is available and at least as big as an off_t. You may need to
|
and long long is at least as big as an off_t. You may need to
|
||||||
add some flags for configuration and compilation to enable this mode. (For
|
add some flags for configuration and compilation to enable this mode. (For
|
||||||
Solaris and Linux, the necessary defines are already defined.) */
|
Solaris and Linux, the necessary defines are already defined.) */
|
||||||
#undef HAVE_LARGEFILE_SUPPORT
|
#undef HAVE_LARGEFILE_SUPPORT
|
||||||
|
|
Loading…
Reference in New Issue