From 6720d572532fe74b256a4f9ed345963ca3369181 Mon Sep 17 00:00:00 2001 From: NickNaso Date: Tue, 23 Jul 2019 22:40:04 +0200 Subject: [PATCH] Create the native threadsafe_function for test only for N-API greater than 3. --- test/threadsafe_function/threadsafe_function.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/threadsafe_function/threadsafe_function.cc b/test/threadsafe_function/threadsafe_function.cc index 529bfb308..e9b16083b 100644 --- a/test/threadsafe_function/threadsafe_function.cc +++ b/test/threadsafe_function/threadsafe_function.cc @@ -2,6 +2,8 @@ #include #include "napi.h" +#if (NAPI_VERSION > 3) + using namespace Napi; constexpr size_t ARRAY_LENGTH = 10; @@ -177,3 +179,5 @@ Object InitThreadSafeFunction(Env env) { return exports; } + +#endif