Skip to content

Commit ca67c2a

Browse files
committed
address review: suggest PyComplex_AsCComplex/PyComplex_FromCComplex
1 parent a923733 commit ca67c2a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
Pending removal in Python 3.20
22
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33

4-
* The ``cval`` field in :c:type:`PyComplexObject` (:gh:`128813`).
4+
* The ``cval`` field in :c:type:`PyComplexObject` (:gh:`128813`):
5+
Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex`
6+
to convert a Python complex number to/from the C :c:type:`Py_complex`
7+
representation.

Doc/whatsnew/3.15.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,10 @@ Deprecated C APIs
571571
(Contributed by Serhiy Storchaka in :gh:`132629`.)
572572

573573
* Deprecate :c:member:`~PyComplexObject.cval` field of the the
574-
:c:type:`PyComplexObject` type.
574+
:c:type:`PyComplexObject` type:
575+
Use :c:func:`PyComplex_AsCComplex` and :c:func:`PyComplex_FromCComplex`
576+
to convert a Python complex number to/from the C :c:type:`Py_complex`
577+
representation.
575578
(Contributed by Sergey B Kirpichev in :gh:`128813`.)
576579

577580
* Functions :c:func:`_Py_c_sum`, :c:func:`_Py_c_diff`, :c:func:`_Py_c_neg`,

0 commit comments

Comments
 (0)