Skip to content

Commit a35cd11

Browse files
committed
address review
1 parent bf55f97 commit a35cd11

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

Doc/c-api/curses.rst

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ included by default by :file:`Python.h`) and :c:func:`import_curses` must
99
be invoked, usually as part of the module initialisation function, to populate
1010
:c:var:`PyCurses_API`.
1111

12+
.. warning::
13+
14+
Neither the C API nor the pure Python :mod:`curses` module are compatible
15+
with subinterpreters.
16+
1217
.. c:macro:: import_curses()
1318
1419
Import the curses C API. The macro does not need a semi-colon to be called.
@@ -41,6 +46,17 @@ be invoked, usually as part of the module initialisation function, to populate
4146
See also the convenience macros :c:macro:`PyCursesSetupTermCalled`,
4247
:c:macro:`PyCursesInitialised`, and :c:macro:`PyCursesInitialisedColor`.
4348

49+
.. note::
50+
51+
The number of entries in this structure is subject to changes.
52+
Consider using :c:macro:`PyCurses_API_pointers` to check if
53+
new fields are available or not.
54+
55+
56+
.. c:macro:: PyCurses_API_pointers
57+
58+
The number of accessible fields (``4``) in :c:var:`PyCurses_API`.
59+
4460

4561
.. c:var:: PyTypeObject PyCursesWindow_Type
4662
@@ -113,14 +129,6 @@ Internal data
113129
The following objects are exposed by the C API but should be considered
114130
internal-only.
115131
116-
117-
.. c:macro:: PyCurses_API_pointers
118-
119-
The number of accessible fields in :c:var:`PyCurses_API`.
120-
121-
Internal usage only.
122-
123-
124132
.. c:macro:: PyCurses_CAPSULE_NAME
125133
126134
Name of the curses capsule to pass to :c:func:`PyCapsule_Import`.

0 commit comments

Comments
 (0)