# HG changeset patch # User Thinker K.F. Li # Date 1312881781 -28800 # Node ID 3dee4d929e1ff3a55584b757df98e5aa2cff5f0e # Parent ddf8a20ecc4b1a94a50f97a93d03f770ab9c0c2d Wrap _DEX_TypeList to _DEX_TypeList_align before append to list. - Fix the issue described by map_verify_error_test(). - When inject a _DEX_ClassDef, dexfile_insert_classdefs_relative() should also inject related _DEX_TypeList. - But, dex_append_obj_list() does not known that _DEX_TypeList should be wrapped to to _DEX_TypeList_align and appended to DEXFile.typeLists. We add a special case in dex_append_obj_list() to wrap _DEX_TypeList before trying to insert to a list. diff -r ddf8a20ecc4b -r 3dee4d929e1f paraspace/injection.py --- a/paraspace/injection.py Tue Aug 09 17:16:43 2011 +0800 +++ b/paraspace/injection.py Tue Aug 09 17:23:01 2011 +0800 @@ -76,6 +76,13 @@ def dex_append_obj_list(dex, obj): from paraspace.dex_deptracker import _dex_tree_get_child from paraspace.dex_deptracker import _dex_tree_set_child + from paraspace.dexfile import _DEX_TypeList, _DEX_TypeList_align + + if isinstance(obj, _DEX_TypeList): + wrapper = _DEX_TypeList_align() + wrapper.value = obj + obj = wrapper + pass type_2_attr = dex_type_2_array_attr_map() try: