From: Fredrik Tolf Date: Sat, 22 Oct 2016 05:54:23 +0000 (+0200) Subject: Added a tell function to the decstream for debugging. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=7db3019f2b9b1912c7825195023395a29bcf7c4b;p=pycfml.git Added a tell function to the decstream for debugging. --- 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: