mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
#1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.
This commit is contained in:
parent
d586559c31
commit
e93237dfcc
108 changed files with 916 additions and 908 deletions
|
@ -202,7 +202,7 @@ PyDict_New(void)
|
|||
if (num_free_dicts) {
|
||||
mp = free_dicts[--num_free_dicts];
|
||||
assert (mp != NULL);
|
||||
assert (Py_Type(mp) == &PyDict_Type);
|
||||
assert (Py_TYPE(mp) == &PyDict_Type);
|
||||
_Py_NewReference((PyObject *)mp);
|
||||
if (mp->ma_fill) {
|
||||
EMPTY_TO_MINSIZE(mp);
|
||||
|
@ -868,10 +868,10 @@ dict_dealloc(register PyDictObject *mp)
|
|||
}
|
||||
if (mp->ma_table != mp->ma_smalltable)
|
||||
PyMem_DEL(mp->ma_table);
|
||||
if (num_free_dicts < MAXFREEDICTS && Py_Type(mp) == &PyDict_Type)
|
||||
if (num_free_dicts < MAXFREEDICTS && Py_TYPE(mp) == &PyDict_Type)
|
||||
free_dicts[num_free_dicts++] = mp;
|
||||
else
|
||||
Py_Type(mp)->tp_free((PyObject *)mp);
|
||||
Py_TYPE(mp)->tp_free((PyObject *)mp);
|
||||
Py_TRASHCAN_SAFE_END(mp)
|
||||
}
|
||||
|
||||
|
@ -1041,7 +1041,7 @@ dict_subscript(PyDictObject *mp, register PyObject *key)
|
|||
if (missing_str == NULL)
|
||||
missing_str =
|
||||
PyString_InternFromString("__missing__");
|
||||
missing = _PyType_Lookup(Py_Type(mp), missing_str);
|
||||
missing = _PyType_Lookup(Py_TYPE(mp), missing_str);
|
||||
if (missing != NULL)
|
||||
return PyObject_CallFunctionObjArgs(missing,
|
||||
(PyObject *)mp, key, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue