Added a tell function to the decstream for debugging.
authorFredrik Tolf <fredrik@dolda2000.com>
Sat, 22 Oct 2016 05:54:23 +0000 (07:54 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Sat, 22 Oct 2016 05:54:23 +0000 (07:54 +0200)
classfile/binfmt.py

index 67a2d3c..cc2f420 100644 (file)
@@ -93,6 +93,9 @@ class decstream(decoder):
         self.buf.extend(ret)
         return False
 
+    def tell(self):
+        return self.bk.tell() - len(self.buf)
+
     def splice(self, ln=-1):
         buf = self.buf
         if ln < 0: