Mercurial > paraspace
diff paraspace/dex_deptracker.py @ 28:5ce7ca1187b3
Pass throught markers for dex types
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Tue, 07 Jun 2011 22:57:28 +0800 |
parents | 15cb829ac442 |
children | b0cc5da28141 |
line wrap: on
line diff
--- a/paraspace/dex_deptracker.py Tue Jun 07 22:30:29 2011 +0800 +++ b/paraspace/dex_deptracker.py Tue Jun 07 22:57:28 2011 +0800 @@ -45,26 +45,27 @@ return False return True + # + # pass throught markers + # + while isinstance(clazz, _marker): + clazz = clazz.back_type + pass + travel_queue = [(getattr(clazz, attr_name), name_path + '.' + attr_name) for attr_name in dir(clazz) if travelable(getattr(clazz, attr_name), attr_name)] - print travel_queue while travel_queue: attr, name_path = travel_queue.pop(0) if isinstance(attr, _marker): - child = attr.back_type - travel_queue.append((child, name_path)) - continue - - yield attr, name_path - - if isinstance(attr, _marker): # # transparent. Enqueue back_type with the same name again. # child = attr.back_type travel_queue.append((child, name_path)) continue + + yield attr, name_path if isinstance(attr, _nest_types): if isinstance(attr, dexfile.array):