Dolda2000 GitWeb
/
pycfml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a small utility library.
[pycfml.git]
/
classfile
/
util.py
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]