Fix dumpers/loaders after __slots__ cleanup
authorIustin Pop <iustin@google.com>
Wed, 10 Feb 2010 11:55:43 +0000 (12:55 +0100)
committerIustin Pop <iustin@google.com>
Wed, 10 Feb 2010 13:13:09 +0000 (14:13 +0100)
commitadf385c718a9bda4d6c08fb18226dc6174556eb5
treebecc337080e461b8606ad09cf8d206efc3b8e32d
parenta4f12da4541f308198061f3e046c3f3e872f79c4
Fix dumpers/loaders after __slots__ cleanup

Commit 154b958 changed (correctly) the __slots__ usage, but this broke
dumpers/loaders since we relied directly on the own class __slots__
field.

To compensate, we introduce a simple function for computing the slots
across all parent classes (if any), and use this instead of __slots__
directly.

Note: the _all_slots() function is duplicated between objects.py and
opcodes.py, but the only other options is to introduce a lang.py for
such very basic language items.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
lib/objects.py
lib/opcodes.py
tools/cfgshell