bpo-46417: _curses uses PyStructSequence_NewType() (GH-30736)

The _curses module now creates its ncurses_version type as a heap
type using PyStructSequence_NewType(), rather than using a static
type.

* Move _PyStructSequence_FiniType() definition to pycore_structseq.h.
* test.pythoninfo: log curses.ncurses_version.
This commit is contained in:
Victor Stinner 2022-01-21 03:30:20 +01:00 committed by GitHub
parent 17f268a4ae
commit 1781d55eb3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 40 additions and 19 deletions

View file

@ -16,11 +16,16 @@ extern PyStatus _PyStructSequence_InitState(PyInterpreterState *);
/* other API */
PyAPI_FUNC(PyTypeObject *) _PyStructSequence_NewType(
PyStructSequence_Desc *desc,
unsigned long tp_flags);
PyAPI_FUNC(int) _PyStructSequence_InitType(
PyTypeObject *type,
PyStructSequence_Desc *desc,
unsigned long tp_flags);
extern void _PyStructSequence_FiniType(PyTypeObject *type);
#ifdef __cplusplus
}