From 3b1df7e5c329d9600cfadd513b557af618c007aa Mon Sep 17 00:00:00 2001 From: dcode Date: Wed, 19 Oct 2022 19:57:07 +0200 Subject: [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. --- src/binaryen-c.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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(); -- cgit v1.2.3