Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv29552
Modified Files:
linkie.py
Log Message:
implemented Linkie.extend
Index: linkie.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/linkie.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- linkie.py 6 Feb 2003 20:34:41 -0000 1.4
+++ linkie.py 9 Feb 2003 16:01:39 -0000 1.5
@@ -194,10 +194,9 @@
that._linker_notes = this._linker_notes[:]
return that
- def __add__ (this, that):
+ def extend (this, that):
if this._unresolved_locals: raise 'Incomplete linkie', this
if that._unresolved_locals: raise 'Incomplete linkie', that
- this = this.copy()
if that.filesz(): this.deskip()
this.align(that._alignment)
delta = this.memsz()
@@ -207,6 +206,11 @@
this._symbols.append((sym, val + delta))
for ofs, typ, arg in that._linker_notes:
this._linker_notes.append((ofs + delta, typ, arg))
+ return this
+
+ def __add__ (this, that):
+ this = this.copy()
+ this.extend(that)
return this
def dump (this):
|