summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/binaryen-c.cpp6
-rw-r--r--src/binaryen-c.h5
2 files changed, 11 insertions, 0 deletions
diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp
index 598156782..b53f5fd0c 100644
--- a/src/binaryen-c.cpp
+++ b/src/binaryen-c.cpp
@@ -5953,6 +5953,12 @@ BinaryenIndex BinaryenTableGetMax(BinaryenTableRef table) {
void BinaryenTableSetMax(BinaryenTableRef table, BinaryenIndex max) {
((Table*)table)->max = max;
}
+BinaryenType BinaryenTableGetType(BinaryenTableRef table) {
+ return ((Table*)table)->type.getID();
+}
+void BinaryenTableSetType(BinaryenTableRef table, BinaryenType tableType) {
+ ((Table*)table)->type = Type(tableType);
+}
//
// =========== ElementSegment operations ===========
diff --git a/src/binaryen-c.h b/src/binaryen-c.h
index ee56afdad..82de2dae9 100644
--- a/src/binaryen-c.h
+++ b/src/binaryen-c.h
@@ -3258,6 +3258,11 @@ BINARYEN_API BinaryenIndex BinaryenTableGetMax(BinaryenTableRef table);
// Sets the maximum number of pages of the specified `Table`.
BINARYEN_API void BinaryenTableSetMax(BinaryenTableRef table,
BinaryenIndex max);
+// Gets the table type of the specified `Table`.
+BINARYEN_API BinaryenType BinaryenTableGetType(BinaryenTableRef table);
+// Sets the table type of the specified `Table`.
+BINARYEN_API void BinaryenTableSetType(BinaryenTableRef table,
+ BinaryenType tableType);
//
// ========== Elem Segment Operations ==========