Skip to content

Commit

Permalink
Remove dead Python parameter in Canonical ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewagner committed Apr 17, 2024
1 parent c8f2aae commit 1a3e3cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions design/mvp/CanonicalABI.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ free list in the free elements of `array`.
self.array.append(h)
return i

def remove(self, rt, i):
def remove(self, i):
h = self.get(i)
self.array[i] = None
self.free.append(i)
Expand Down Expand Up @@ -409,7 +409,7 @@ class HandleTables:
def add(self, rt, h):
return self.table(rt).add(h)
def remove(self, rt, i):
return self.table(rt).remove(rt, i)
return self.table(rt).remove(i)
```
While this Python code performs a dynamic hash-table lookup on each handle
table access, as we'll see below, the `rt` parameter is always statically
Expand Down
4 changes: 2 additions & 2 deletions design/mvp/canonical-abi/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def add(self, h):
self.array.append(h)
return i

def remove(self, rt, i):
def remove(self, i):
h = self.get(i)
self.array[i] = None
self.free.append(i)
Expand All @@ -377,7 +377,7 @@ def get(self, rt, i):
def add(self, rt, h):
return self.table(rt).add(h)
def remove(self, rt, i):
return self.table(rt).remove(rt, i)
return self.table(rt).remove(i)

### Loading

Expand Down

0 comments on commit 1a3e3cf

Please sign in to comment.