mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
This commit is contained in:
parent
b1994b4a5d
commit
6819210b9e
129 changed files with 1090 additions and 1250 deletions
|
@ -1566,8 +1566,7 @@ PyCursesWindow_GetAttr(PyCursesWindowObject *self, char *name)
|
|||
/* -------------------------------------------------------*/
|
||||
|
||||
PyTypeObject PyCursesWindow_Type = {
|
||||
PyObject_HEAD_INIT(NULL)
|
||||
0, /*ob_size*/
|
||||
PyVarObject_HEAD_INIT(NULL, 0)
|
||||
"_curses.curses window", /*tp_name*/
|
||||
sizeof(PyCursesWindowObject), /*tp_basicsize*/
|
||||
0, /*tp_itemsize*/
|
||||
|
@ -2657,7 +2656,7 @@ init_curses(void)
|
|||
static void *PyCurses_API[PyCurses_API_pointers];
|
||||
|
||||
/* Initialize object type */
|
||||
PyCursesWindow_Type.ob_type = &PyType_Type;
|
||||
Py_Type(&PyCursesWindow_Type) = &PyType_Type;
|
||||
|
||||
/* Initialize the C API pointer array */
|
||||
PyCurses_API[0] = (void *)&PyCursesWindow_Type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue