Commit 7a550545 authored by Vincent Pelletier's avatar Vincent Pelletier

Add support for None in values (unknown size at the moment).

git-svn-id: 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 70d9d928
......@@ -110,6 +110,9 @@ def sizeof(o):
"""This function returns the estimated size of an object."""
if isinstance(o, tuple):
return sum((sizeof(s) for s in o))
elif o is None:
# XXX: unknown size (arch pointer ?)
return 0
return len(o)+16
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment