Dolda2000 GitWeb
/
pycfml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Handle the invokedynamic-related constant-pool entries.
[pycfml.git]
/
classfile
/
binfmt.py
diff --git
a/classfile/binfmt.py
b/classfile/binfmt.py
index
57671f9
..
cc2f420
100644
(file)
--- a/
classfile/binfmt.py
+++ b/
classfile/binfmt.py
@@
-26,7
+26,7
@@
def mutf8dec(bs):
b = bs[i]
i += 1
if b & 0xc0 != 0x80: raise fmterror("invalid utf8 continuation byte")
b = bs[i]
i += 1
if b & 0xc0 != 0x80: raise fmterror("invalid utf8 continuation byte")
- acc = (acc << 6) | b
s
& 0x3f
+ acc = (acc << 6) | b & 0x3f
c -= 1
if iacc == 0 and ic != 2 and acc != 0: raise fmterror("invalid utf8 compound")
ret += chr(acc)
c -= 1
if iacc == 0 and ic != 2 and acc != 0: raise fmterror("invalid utf8 compound")
ret += chr(acc)
@@
-93,6
+93,9
@@
class decstream(decoder):
self.buf.extend(ret)
return False
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:
def splice(self, ln=-1):
buf = self.buf
if ln < 0: