diff options
author | dcode <dcode@dcode.io> | 2022-10-19 19:57:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 10:57:07 -0700 |
commit | 3b1df7e5c329d9600cfadd513b557af618c007aa (patch) | |
tree | 4186b20d32b46294d2862fe945fc5c574359e6ac /src | |
parent | ded21cf0c1c09dd4e025406c759e3d4bb08d31cc (diff) | |
download | binaryen-3b1df7e5c329d9600cfadd513b557af618c007aa.tar.gz binaryen-3b1df7e5c329d9600cfadd513b557af618c007aa.tar.bz2 binaryen-3b1df7e5c329d9600cfadd513b557af618c007aa.zip |
[C API] Align I31ref and Dataref to be nullable (#5153)
The C API still returned non nullable types for `dataref` (`ref data` instead of `ref null data`) and `i31ref` (`ref i31` instead of `ref null i31`). This PR aligns with the current state of the GC proposal, making them nullable when obtained via the C API.
Diffstat (limited to 'src')
-rw-r--r-- | src/binaryen-c.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index cd3806810..4501a67e0 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -197,10 +197,10 @@ BinaryenType BinaryenTypeEqref(void) { return Type(HeapType::eq, Nullable).getID(); } BinaryenType BinaryenTypeI31ref(void) { - return Type(HeapType::i31, NonNullable).getID(); + return Type(HeapType::i31, Nullable).getID(); } BinaryenType BinaryenTypeDataref(void) { - return Type(HeapType::data, NonNullable).getID(); + return Type(HeapType::data, Nullable).getID(); } BinaryenType BinaryenTypeArrayref(void) { return Type(HeapType::array, Nullable).getID(); |