Skip to content

Commit f42b848

Browse files
committed
Update CanonicalABI.md to match definitions.py
1 parent d88f5c2 commit f42b848

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

design/mvp/CanonicalABI.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ immediates that can be passed to the `canon` definition being implemented.
233233
class CanonicalOptions:
234234
memory: Optional[bytearray] = None
235235
string_encoding: Optional[str] = None
236-
realloc: Optional[Callable[[int,int,int,int],int]] = None
237-
post_return: Optional[Callable[[],None]] = None
236+
realloc: Optional[Callable] = None
237+
post_return: Optional[Callable] = None
238238
```
239239

240240
The `inst` field of `CallContext` points to the component instance which the
@@ -296,7 +296,7 @@ corresponds to resource type equality, as defined by [type checking] rules.
296296
```python
297297
class ResourceType(Type):
298298
impl: ComponentInstance
299-
dtor: Optional[Callable[[int],None]]
299+
dtor: Optional[Callable]
300300

301301
def __init__(self, impl, dtor = None):
302302
self.impl = impl
@@ -431,7 +431,6 @@ class ImportCall(CallContext):
431431
lenders: list[HandleElem]
432432

433433
def __init__(self, opts, inst):
434-
assert(inst.entered)
435434
super().__init__(opts, inst)
436435
self.lenders = []
437436

@@ -441,7 +440,6 @@ class ImportCall(CallContext):
441440
self.lenders.append(lending_handle)
442441

443442
def exit(self):
444-
assert(self.inst.entered)
445443
for h in self.lenders:
446444
h.lend_count -= 1
447445
```

0 commit comments

Comments
 (0)