# HG changeset patch # User Thinker K.F. Li # Date 1311512094 -28800 # Node ID 7a059ab408f0a627ce62f746df3cc55c8dd69fe2 # Parent bbe8d5cbe3681c99cc044293c382deaba32f5b83 Refactoring procedure of initialize dependency declarations diff -r bbe8d5cbe368 -r 7a059ab408f0 paraspace/dex_deptracker.py --- a/paraspace/dex_deptracker.py Sun Jul 24 19:15:04 2011 +0800 +++ b/paraspace/dex_deptracker.py Sun Jul 24 20:54:54 2011 +0800 @@ -553,6 +553,12 @@ pass +## \brief Re-link dependencies that depend on a composite type. +# +# If an attribute depends on a composite type, it is still reference +# composite type itself after a marker been installed on the composite +# type. This function will fix it. +# def _patch_dex_type_markers(all_dep_decls): import itertools marked_types = dict([(marker.back_type, name) @@ -876,6 +882,14 @@ pass +## \brief Prepare and return dependency declares. +def prepare_dep_decls(): + decls = collect_all_dep_decls() + _install_idx_marker(decls) + _patch_dex_type_markers(decls) + return decls + + if __name__ == '__main__': dex = dexfile.DEXFile.open('data/testdata1.dex')