Dolda2000 GitWeb
/
pycfml.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a47385
)
Added a small utility library.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 14 Sep 2014 03:48:24 +0000
(
05:48
+0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sun, 14 Sep 2014 03:48:24 +0000
(
05:48
+0200)
classfile/util.py
[new file with mode: 0644]
patch
|
blob
diff --git a/classfile/util.py
b/classfile/util.py
new file mode 100644
(file)
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]