From fecfa92d71633f8bb28bb97a60adc9b54998456f Mon Sep 17 00:00:00 2001 From: Max Graey Date: Fri, 28 Aug 2020 16:23:32 +0300 Subject: Add Binaryen(Get|Set)AllowHeavyweight to binaryen-c.h (#3082) These declarations were previously missing causing the respective APIs to be not exposed. Also makes sure that a Boolean is returned by the JS API and adds a test to verify that it is working now. --- src/binaryen-c.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/binaryen-c.cpp') diff --git a/src/binaryen-c.cpp b/src/binaryen-c.cpp index 6776b785c..db9258d59 100644 --- a/src/binaryen-c.cpp +++ b/src/binaryen-c.cpp @@ -3528,11 +3528,11 @@ void BinaryenSetOneCallerInlineMaxSize(BinaryenIndex size) { globalPassOptions.inlining.oneCallerInlineMaxSize = size; } -bool BinaryenGetAllowHeavyweight(void) { +int BinaryenGetAllowHeavyweight(void) { return globalPassOptions.inlining.allowHeavyweight; } -void BinaryenSetAllowHeavyweight(bool enabled) { +void BinaryenSetAllowHeavyweight(int enabled) { globalPassOptions.inlining.allowHeavyweight = enabled; } -- cgit v1.2.3