summaryrefslogtreecommitdiff
path: root/src/binaryen-c.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/binaryen-c.h')
-rw-r--r--src/binaryen-c.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/binaryen-c.h b/src/binaryen-c.h
index 1015c65de..9dddc9ce6 100644
--- a/src/binaryen-c.h
+++ b/src/binaryen-c.h
@@ -1064,6 +1064,12 @@ BINARYEN_API BinaryenFunctionRef BinaryenGetFunction(BinaryenModuleRef module,
BINARYEN_API void BinaryenRemoveFunction(BinaryenModuleRef module,
const char* name);
+// Gets the number of functions in the module.
+BINARYEN_API uint32_t BinaryenGetNumFunctions(BinaryenModuleRef module);
+// Get function pointer from its index.
+BINARYEN_API BinaryenFunctionRef
+BinaryenGetFunctionByIndex(BinaryenModuleRef module, BinaryenIndex id);
+
// Imports
BINARYEN_API void
@@ -1168,6 +1174,17 @@ BINARYEN_API void BinaryenSetMemory(BinaryenModuleRef module,
BinaryenIndex numSegments,
uint8_t shared);
+// Memory segments. Query utilities.
+
+BINARYEN_API uint32_t BinaryenGetNumMemorySegments(BinaryenModuleRef module);
+BINARYEN_API int64_t
+BinaryenGetMemorySegmentByteOffset(BinaryenModuleRef module, BinaryenIndex id);
+BINARYEN_API size_t BinaryenGetMemorySegmentByteLength(BinaryenModuleRef module,
+ BinaryenIndex id);
+BINARYEN_API void BinaryenCopyMemorySegmentData(BinaryenModuleRef module,
+ BinaryenIndex id,
+ char* buffer);
+
// Start function. One per module
BINARYEN_API void BinaryenSetStart(BinaryenModuleRef module,
@@ -1437,6 +1454,11 @@ BinaryenExportGetKind(BinaryenExportRef export_);
BINARYEN_API const char* BinaryenExportGetName(BinaryenExportRef export_);
// Gets the internal name of the specified export.
BINARYEN_API const char* BinaryenExportGetValue(BinaryenExportRef export_);
+// Gets the number of exports in the module.
+BINARYEN_API uint32_t BinaryenGetNumExports(BinaryenModuleRef module);
+// Get export pointer from its index.
+BINARYEN_API BinaryenExportRef
+BinaryenGetExportByIndex(BinaryenModuleRef module, BinaryenIndex id);
//
// ========= Custom sections =========