Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv13842
Modified Files:
linkie.py
Log Message:
simplified Linkie.link
Index: linkie.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/linkie.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- linkie.py 26 Apr 2003 21:18:39 -0000 1.41
+++ linkie.py 26 Apr 2003 21:22:20 -0000 1.42
@@ -281,21 +281,11 @@
i = i - 1
offset, type, arg = this._linker_notes[i]
if symbols.has_key(arg):
- if type == 1:
- this.add_byte(offset, symbols[arg])
- elif type == 2:
- this.add_wyde(offset, symbols[arg])
- elif type == 4:
- this.add_tetra(offset, symbols[arg])
- elif type == -1:
- this.add_byte(offset, symbols[arg] -
- (this._origin + offset))
- elif type == -2:
- this.add_wyde(offset, symbols[arg] -
- (this._origin + offset))
- elif type == -4:
- this.add_tetra(offset, symbols[arg] -
- (this._origin + offset))
+ if type in (1, 2, 4):
+ this[offset::type] += symbols[arg]
+ elif type in (-1, -2, -4):
+ this[offset::-type] += \
+ symbols[arg] - (this._origin + offset)
else: raise 'Invalid linker note type', (offset, type, arg)
del this._linker_notes[i]
return len(this._linker_notes)
|