Skip to content

Commit

Permalink
Use 'versionadded:: next' and relocate dict addition
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Dec 30, 2024
1 parent 8607e95 commit 7090755
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Doc/library/curses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ The :mod:`curses` module defines the following data members:

An integer representing the current version of the ncurses extensions.

.. versionadded:: 3.13
.. versionadded:: next


.. data:: version
Expand Down
7 changes: 4 additions & 3 deletions Modules/_cursesmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -5071,9 +5071,6 @@ cursesmodule_exec(PyObject *module)
return -1;
}
#endif /* NCURSES_VERSION */
#ifdef NCURSES_EXT_FUNCS
SetDictInt("NCURSES_EXT_FUNCS", NCURSES_EXT_FUNCS);
#endif

#define SetDictInt(NAME, VALUE) \
do { \
Expand Down Expand Up @@ -5222,6 +5219,10 @@ cursesmodule_exec(PyObject *module)
}
SetDictInt("KEY_MIN", KEY_MIN);
SetDictInt("KEY_MAX", KEY_MAX);

#ifdef NCURSES_EXT_FUNCS
SetDictInt("NCURSES_EXT_FUNCS", NCURSES_EXT_FUNCS);
#endif
#undef SetDictInt
return 0;
}
Expand Down

0 comments on commit 7090755

Please sign in to comment.