From 6dc3182fcfffe47c39800bd174d11e3f63a91600 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Tue, 17 Dec 2024 17:30:05 +0300 Subject: [PATCH] Use CTX macros with defined NAPI only Signed-off-by: Sergey Malenkov --- interop/src/cpp/common-interop.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/interop/src/cpp/common-interop.cc b/interop/src/cpp/common-interop.cc index b63627135..5812a7978 100644 --- a/interop/src/cpp/common-interop.cc +++ b/interop/src/cpp/common-interop.cc @@ -317,13 +317,6 @@ void setCallbackCallerSync(Callback_Caller_Sync_t callbackCallerSync) { g_callbackCallerSync = callbackCallerSync; } -void impl_CallCallbackSync(KVMContext vmContext, KInt callbackKind, KByte* args, KInt argsSize) { - if (g_callbackCallerSync) { - g_callbackCallerSync(vmContext, callbackKind, args, argsSize); - } -} -KOALA_INTEROP_CTX_V3(CallCallbackSync, KInt, KByte*, KInt) - void impl_CallCallbackResourceHolder(KNativePointer holder, KInt resourceId) { reinterpret_cast(holder)(resourceId); } @@ -433,4 +426,11 @@ KStringPtr impl_StdStringToString(KVMContext vmContext, KNativePointer stringPtr return result; } KOALA_INTEROP_CTX_1(StdStringToString, KStringPtr, KNativePointer) + +void impl_CallCallbackSync(KVMContext vmContext, KInt callbackKind, KByte* args, KInt argsSize) { + if (g_callbackCallerSync) { + g_callbackCallerSync(vmContext, callbackKind, args, argsSize); + } +} +KOALA_INTEROP_CTX_V3(CallCallbackSync, KInt, KByte*, KInt) #endif \ No newline at end of file -- Gitee