From 8a2bee0f1d4707a54524d1164c2d6f475e641d06 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Thu, 16 Jan 2025 18:16:37 +0300 Subject: [PATCH 1/2] Fix npm run demo:wasm Signed-off-by: Sergey Malenkov --- interop/src/cpp/wasm/convertors-wasm.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/interop/src/cpp/wasm/convertors-wasm.h b/interop/src/cpp/wasm/convertors-wasm.h index 34114e0fc..0aa68977f 100644 --- a/interop/src/cpp/wasm/convertors-wasm.h +++ b/interop/src/cpp/wasm/convertors-wasm.h @@ -17,6 +17,7 @@ #include "koala-types.h" +#include #include #define KOALA_INTEROP_EXPORT EMSCRIPTEN_KEEPALIVE extern "C" @@ -734,4 +735,10 @@ KOALA_INTEROP_EXPORT void name( \ P1 p1 = getArgument(_p1); \ P2 p2 = getArgument(_p2); \ impl_##name(nullptr, p0, p1, p2); \ -} \ No newline at end of file +} + +#define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ + do { \ + assert(false); /* TODO: implement*/ \ + return __VA_ARGS__; \ + } while (0) -- Gitee From 31c6151db6d1299487a52f0d78c9952f1d0cdea6 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Thu, 16 Jan 2025 18:31:38 +0300 Subject: [PATCH 2/2] add second definition Signed-off-by: Sergey Malenkov --- interop/src/cpp/wasm/convertors-wasm.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interop/src/cpp/wasm/convertors-wasm.h b/interop/src/cpp/wasm/convertors-wasm.h index 0aa68977f..2b4dccdc2 100644 --- a/interop/src/cpp/wasm/convertors-wasm.h +++ b/interop/src/cpp/wasm/convertors-wasm.h @@ -737,6 +737,12 @@ KOALA_INTEROP_EXPORT void name( \ impl_##name(nullptr, p0, p1, p2); \ } +#define KOALA_INTEROP_THROW(vmContext, object, ...) \ + do { \ + assert(false); /* TODO: implement*/ \ + return __VA_ARGS__; \ + } while (0) + #define KOALA_INTEROP_THROW_STRING(vmContext, message, ...) \ do { \ assert(false); /* TODO: implement*/ \ -- Gitee