# HG changeset patch # User Thinker K.F. Li # Date 1313401464 -28800 # Node ID a95b69de2e226ff7b02181580343bc9dd1d7a559 # Parent 032877e14560e08dea3a7e323d7b435c73efcc04 Fix bug of returning _DEX_TypeList_align of dex_append_obj_list() diff -r 032877e14560 -r a95b69de2e22 paraspace/injection.py --- a/paraspace/injection.py Mon Aug 15 17:26:46 2011 +0800 +++ b/paraspace/injection.py Mon Aug 15 17:44:24 2011 +0800 @@ -79,6 +79,7 @@ from paraspace.dexfile import _DEX_TypeList, _DEX_TypeList_align from paraspace.dexfile import array_sorted + ret_obj = obj if isinstance(obj, _DEX_TypeList): wrapper = _DEX_TypeList_align() wrapper.value = obj @@ -96,7 +97,10 @@ if isinstance(array, array_sorted): if obj in array.items: idx = array.items.index(obj) - return array.items[idx] + obj = array.items[idx] + if isinstance(obj, _DEX_TypeList_align): + return obj.value + return obj pass array.items.append(obj) @@ -107,7 +111,7 @@ _dex_tree_set_child(dex, count_name, count + 1) pass - return obj + return ret_obj ## \brief Clone a composite object.