Changeset 432f68a in mainline for kernel/tools/genmap.py


Ignore:
Timestamp:
2011-03-21T15:29:05Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5287502, 5e3eea10, 667a4f8, ab10b842, f554a94
Parents:
afe1d1e
git-author:
Vojtech Horky <> (2011-03-21 15:29:05)
git-committer:
Martin Decky <martin@…> (2011-03-21 15:29:05)
Message:

improve compatibility with Python 3.2 (thx Vojtech Horky)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/tools/genmap.py

    rafe1d1e r432f68a  
    100100                        for addr, symbol in symbols:
    101101                                value = fname + ':' + symbol
    102                                 data = struct.pack(symtabfmt, addr + offset, value[:MAXSTRING])
     102                                value_bytes = value.encode('ascii')
     103                                data = struct.pack(symtabfmt, addr + offset, value_bytes[:MAXSTRING])
    103104                                out.write(data)
    104105                       
    105         out.write(struct.pack(symtabfmt, 0, ''))
     106        out.write(struct.pack(symtabfmt, 0, b''))
    106107
    107108def main():
Note: See TracChangeset for help on using the changeset viewer.