From 7db3019f2b9b1912c7825195023395a29bcf7c4b Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sat, 22 Oct 2016 07:54:23 +0200 Subject: [PATCH] Added a tell function to the decstream for debugging. --- classfile/binfmt.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/classfile/binfmt.py b/classfile/binfmt.py index 67a2d3c..cc2f420 100644 --- a/classfile/binfmt.py +++ b/classfile/binfmt.py @@ -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: -- 2.11.0