# HG changeset patch # User Thinker K.F. Li # Date 1311578523 -28800 # Node ID 9373465643e01ea26477f4bbd60e416da663111c # Parent 88645ab29aeb86ca65ef4a45ebecf8b1e557378e Fix bug of DEXFile_linked.get_classdef_name diff -r 88645ab29aeb -r 9373465643e0 paraspace/dexfile.py --- a/paraspace/dexfile.py Mon Jul 25 14:22:08 2011 +0800 +++ b/paraspace/dexfile.py Mon Jul 25 15:22:03 2011 +0800 @@ -1689,7 +1689,7 @@ ## \brief Return name string of a linked class definition item @staticmethod def get_classdef_name(classdef): - return classdef.classIdx.descriptorIdx.stringDataOff.data + return classdef.classIdx.descriptorIdx.stringDataOff.data.data def find_class_name(self, name): for classdef in self.classDefs.items: diff -r 88645ab29aeb -r 9373465643e0 paraspace/tests/injection_test.py --- a/paraspace/tests/injection_test.py Mon Jul 25 14:22:08 2011 +0800 +++ b/paraspace/tests/injection_test.py Mon Jul 25 15:22:03 2011 +0800 @@ -39,7 +39,10 @@ fakefile_fn = os.path.join(srcroot, 'data', 'fakefile.dex') fakefile_dex = dexfile.DEXFile.open(fakefile_fn) fakefile_linked = \ - dexfile.DEXFile_linked.build_dependencies(fakefile_dex, - all_dep_decls) + dexfile.DEXFile_linked. \ + build_dependencies(fakefile_dex, all_dep_decls) + + fakefile_def = fakefile_linked. \ + find_class_name('Lcom/codemud/fakefile/fakefile;') pass