From efdb7a220fe10c6dd82b13991f1f20343479dcd4 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 14 Sep 2014 05:48:24 +0200 Subject: [PATCH] Added a small utility library. --- classfile/util.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 classfile/util.py diff --git a/classfile/util.py b/classfile/util.py new file mode 100644 index 0000000..24e07a8 --- /dev/null +++ b/classfile/util.py @@ -0,0 +1,5 @@ +def resource(cls, newfile, lnoff): + cls.srcfile = cls.intern(newfile, True) + for method in cls.methods: + if method.code and method.code.lintab: + method.code.lintab = [(pc, lin + lnoff) for pc, lin in method.code.lintab] -- 2.11.0