Mercurial > paraspace
diff paraspace/dexfile.py @ 27:15cb829ac442
travel_dex_type() recoganizes _dex_type correctly
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Tue, 07 Jun 2011 22:30:29 +0800 |
parents | 670167ed06bb |
children | b0cc5da28141 |
line wrap: on
line diff
--- a/paraspace/dexfile.py Tue Jun 07 15:02:42 2011 +0800 +++ b/paraspace/dexfile.py Tue Jun 07 22:30:29 2011 +0800 @@ -116,7 +116,11 @@ return total -class _rawstr(object): +class _dex_type(object): + pass + + +class _rawstr(_dex_type): size = None factor = None data = None @@ -168,7 +172,7 @@ pass -class tap(object): +class tap(_dex_type): @staticmethod def parse(parent, data, off): pass @@ -183,7 +187,7 @@ pass -class uint32(object): +class uint32(_dex_type): @staticmethod def parse(parent, data, off): v = _to_uint(data[off:off + 4]) @@ -200,7 +204,7 @@ pass -class uint16(object): +class uint16(_dex_type): @staticmethod def parse(parent, data, off): v = _to_uint(data[off:off + 2]) @@ -216,7 +220,7 @@ pass -class uint8(object): +class uint8(_dex_type): @staticmethod def parse(parent, data, off): v = _to_uint(data[off:off + 1]) @@ -232,7 +236,7 @@ pass -class int32(object): +class int32(_dex_type): @staticmethod def parse(parent, data, off): v = _to_int(data[off:off + 4]) @@ -249,7 +253,7 @@ pass -class int16(object): +class int16(_dex_type): @staticmethod def parse(parent, data, off): v = _to_int(data[off:off + 2]) @@ -265,7 +269,7 @@ pass -class uleb128(object): +class uleb128(_dex_type): @staticmethod def parse(parent, data, off): v, sh = _uleb128(data[off:off + 5]) @@ -281,7 +285,7 @@ pass -class leb128(object): +class leb128(_dex_type): @staticmethod def parse(parent, data, off): v, sh = _leb128(data[off:off + 5]) @@ -297,7 +301,7 @@ pass -class auto_align(object): +class auto_align(_dex_type): bits = None def __init__(self, bits): @@ -325,7 +329,7 @@ return o.__class__.sizeof(o) -class relocatable(object): +class relocatable(_dex_type): data_size = None @staticmethod @@ -1280,7 +1284,7 @@ pass -class dummy(object): +class dummy(_dex_type): data_size = None @staticmethod