diff paraspace/dexfile.py @ 81:7adb8c3b3c44

Add classDataOffRef for _DEX_ClassDef It makes sure value of classDataOff of a _DEX_ClassDef instance depending on a _DEX_ClassData objects.
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 20 Jul 2011 01:55:48 +0800
parents 9c7bfb13b262
children 793af8437efe
line wrap: on
line diff
--- a/paraspace/dexfile.py	Tue Jul 19 18:46:30 2011 +0800
+++ b/paraspace/dexfile.py	Wed Jul 20 01:55:48 2011 +0800
@@ -967,6 +967,9 @@
                              depend_off('_DEX_AnnotationsDirectoryItem')
                              (value_ref('_DEX_ClassDef.annotationsOff')))
     classDataOff = uint32
+    classDataOffRef = cond((lambda parent, data, off: parent.classDataOff),
+                           depend_off('_DEX_ClassData')
+                           (value_ref('_DEX_ClassDef.classDataOff')))
     staticValuesOff = uint32
     staticValuesOffRef = cond((lambda parent, data, off:
                                    parent.staticValuesOff),