mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
#1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT.
This commit is contained in:
parent
99170a5dbf
commit
90aa7646af
144 changed files with 1306 additions and 1153 deletions
|
@ -67,7 +67,7 @@ typedef struct {
|
|||
|
||||
|
||||
#define PyStruct_Check(op) PyObject_TypeCheck(op, &PyStructType)
|
||||
#define PyStruct_CheckExact(op) (Py_Type(op) == &PyStructType)
|
||||
#define PyStruct_CheckExact(op) (Py_TYPE(op) == &PyStructType)
|
||||
|
||||
|
||||
/* Exception */
|
||||
|
@ -126,7 +126,7 @@ get_pylong(PyObject *v)
|
|||
Py_INCREF(v);
|
||||
return v;
|
||||
}
|
||||
m = Py_Type(v)->tp_as_number;
|
||||
m = Py_TYPE(v)->tp_as_number;
|
||||
if (m != NULL && m->nb_long != NULL) {
|
||||
v = m->nb_long(v);
|
||||
if (v == NULL)
|
||||
|
@ -1485,7 +1485,7 @@ s_dealloc(PyStructObject *s)
|
|||
PyMem_FREE(s->s_codes);
|
||||
}
|
||||
Py_XDECREF(s->s_format);
|
||||
Py_Type(s)->tp_free((PyObject *)s);
|
||||
Py_TYPE(s)->tp_free((PyObject *)s);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
@ -1870,7 +1870,7 @@ init_struct(void)
|
|||
if (m == NULL)
|
||||
return;
|
||||
|
||||
Py_Type(&PyStructType) = &PyType_Type;
|
||||
Py_TYPE(&PyStructType) = &PyType_Type;
|
||||
if (PyType_Ready(&PyStructType) < 0)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue