Skip to content

Commit

Permalink
Fix Slice class
Browse files Browse the repository at this point in the history
  • Loading branch information
dungeon-master-666 committed Jul 18, 2023
1 parent c3f0dc8 commit 9c9cf3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tvm_valuetypes/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,11 +470,13 @@ def test_boc_deserialization():
assert dc1.refs[0].refs[0].data == c3.data


def Slice(Cell):
class Slice(Cell):
def __repr__(self):
return "<Slice refs_num: %d, data: %s>" % (
len(self.refs), repr(self.data))

def __init__(self, cell):
self.data = cell.data.copy()
self.refs = cell.refs.copy()
assert cell.special == False
self.special = cell.special

0 comments on commit 9c9cf3b

Please sign in to comment.