Skip to content

Commit f6db66b

Browse files
committed
pyassem: LineAddrTable: Use bytes() type.
1 parent 5c11467 commit f6db66b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/pyassem.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def __init__(self):
611611

612612
def addCode(self, *args):
613613
for arg in args:
614-
self.code.append(chr(arg))
614+
self.code.append(arg)
615615
self.codeOffset = self.codeOffset + len(args)
616616

617617
def nextLine(self, lineno):
@@ -647,10 +647,10 @@ def nextLine(self, lineno):
647647
self.lastoff = self.codeOffset
648648

649649
def getCode(self):
650-
return ''.join(self.code)
650+
return bytes(self.code)
651651

652652
def getTable(self):
653-
return ''.join(map(chr, self.lnotab))
653+
return bytes(self.lnotab)
654654

655655
class StackDepthTracker:
656656
# XXX 1. need to keep track of stack depth on jumps

0 commit comments

Comments
 (0)