Merged revisions 64518,64521-64525,64528-64533 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r64518 | robert.schuppenies | 2008-06-25 11:20:03 +0200 (Wed, 25 Jun 2008) | 2 lines

  Issue 3147: Fixed SizeofTest failure for LLP64 systems.
........
  r64533 | robert.schuppenies | 2008-06-26 17:20:35 +0200 (Thu, 26 Jun 2008) | 3 lines

  Corrected inconsistencies in sizeof tests and addressed issue pointed
  out by Jean Brouwers.
........
This commit is contained in:
Robert Schuppenies 2008-06-28 23:58:47 +00:00
parent 42806bad9b
commit 4d45bfe4c5
2 changed files with 54 additions and 72 deletions

View file

@ -1845,7 +1845,7 @@ dict_sizeof(PyDictObject *mp)
{
Py_ssize_t res;
res = sizeof(PyDictObject) + sizeof(mp->ma_table);
res = sizeof(PyDictObject);
if (mp->ma_table != mp->ma_smalltable)
res = res + (mp->ma_mask + 1) * sizeof(PyDictEntry);
return PyLong_FromSsize_t(res);