commit | 78a3bc49e8a5fa40b98a8789074a7decfdbcb433 | [log] [tgz] |
---|---|---|
author | Rich Lane <rlane@bigswitch.com> | Fri Nov 29 19:22:08 2013 -0800 |
committer | Rich Lane <rlane@bigswitch.com> | Sat Nov 30 00:38:04 2013 -0800 |
tree | c446f615ad73842b35e99fdbce78384d7393705a | |
parent | 9d98adfa857603d4deb0aa2976fc12f47d452691 [diff] [blame] |
pyloxi: generate virtual class unpack methods This is done completely from the IR now.
diff --git a/py_gen/util.py b/py_gen/util.py index b405441..2a0dc54 100644 --- a/py_gen/util.py +++ b/py_gen/util.py
@@ -49,3 +49,10 @@ if value == value2: return "const." + name return repr(value) + +def ancestors(ofclass): + r = [] + while ofclass: + r.append(ofclass) + ofclass = ofclass.superclass + return r