Skip to content

Commit 0dfa681

Browse files
committed
Update
1 parent 7ba3ca4 commit 0dfa681

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

docs/api.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,37 +41,37 @@ Python 3.11
4141
4242
.. c:function:: int PyFloat_Pack2(double x, unsigned char *p, int le)
4343
44-
Pack a C double as 16-bit.
44+
Pack a C double as the IEEE 754 binary16 half-precision format.
4545
4646
Availability: Python 3.6 and newer. Not available on PyPy
4747
4848
.. c:function:: int PyFloat_Pack4(double x, unsigned char *p, int le)
4949
50-
Pack a C double as 32-bit.
50+
Pack a C double as the IEEE 754 binary32 single precision format.
5151
5252
Not available on PyPy
5353
5454
.. c:function:: int PyFloat_Pack8(double x, unsigned char *p, int le)
5555
56-
Pack a C double as 64-bit.
56+
Pack a C double as the IEEE 754 binary64 double precision format.
5757
5858
Not available on PyPy
5959
6060
.. c:function:: double PyFloat_Unpack2(const unsigned char *p, int le)
6161
62-
Unpack 16-bit as a C double.
62+
Unpack the IEEE 754 binary16 half-precision format as a C double.
6363
6464
Availability: Python 3.6 and newer. Not available on PyPy
6565
6666
.. c:function:: double PyFloat_Unpack4(const unsigned char *p, int le)
6767
68-
Unpack 32-bit as a C double.
68+
Unpack the IEEE 754 binary32 single precision format as a C double.
6969
7070
Not available on PyPy
7171
7272
.. c:function:: double PyFloat_Unpack8(const unsigned char *p, int le)
7373
74-
Unpack 64-bit as a C double.
74+
Unpack the IEEE 754 binary64 double precision format as a C double.
7575
7676
Not available on PyPy
7777

pythoncapi_compat.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,8 @@ _Py_IS_TYPE(const PyObject *ob, const PyTypeObject *type) {
391391
#endif
392392

393393

394-
// bpo-11734 added _PyFloat_Pack2() and _PyFloat_Unpack2() to Python 3.6.0b1
394+
// bpo-11734 added _PyFloat_Pack2() and _PyFloat_Unpack2() to Python 3.6.0b1.
395+
// bpo-46906 added PyFloat_Pack2() and PyFloat_Unpack2() to Python 3.11a7.
395396
#if 0x030600B1 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x030B00A7 && !defined(PYPY_VERSION)
396397
PYCAPI_COMPAT_STATIC_INLINE(int)
397398
PyFloat_Pack2(double x, char *p, int le)
@@ -403,6 +404,8 @@ PyFloat_Unpack2(const char *p, int le)
403404
#endif
404405

405406

407+
// bpo-46906 added PyFloat_Pack4(), PyFloat_Pack8(), PyFloat_Unpack4() and
408+
// PyFloat_Unpack8() to Python 3.11a7.
406409
#if PY_VERSION_HEX < 0x030B00A7 && !defined(PYPY_VERSION)
407410
PYCAPI_COMPAT_STATIC_INLINE(int)
408411
PyFloat_Pack4(double x, char *p, int le)

0 commit comments

Comments
 (0)