changeset 9:9a49826b26d4

Refactor _parse_header()
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 24 May 2011 15:02:50 +0800
parents 59dd10bf60f2
children 123c7a8bbf4c
files paraspace/dexfile.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/paraspace/dexfile.py	Tue May 24 14:55:18 2011 +0800
+++ b/paraspace/dexfile.py	Tue May 24 15:02:50 2011 +0800
@@ -1164,12 +1164,16 @@
                                  for i in range(annoitem_map.size)]
         pass
 
-    def parse(self, data):
-        self._data = data
+    def _parse_header(self):
+        data = self._data
         header = _DEX_header()
         header.parse(data)
         self._header = header
+        pass
 
+    def parse(self, data):
+        self._data = data
+        self._parse_header()
         self._parse_maps()
         self._parse_strings()
         self._parse_typeIds()