diff --git a/napi-inl.h b/napi-inl.h index 649be98ac..99ed3e3d3 100644 --- a/napi-inl.h +++ b/napi-inl.h @@ -137,7 +137,7 @@ struct FinalizeData { Hint* hint; }; -#if (NAPI_VERSION > 3) +#if (NAPI_VERSION > 3 && !defined(__wasm32__)) template , typename FinalizerDataType=void> @@ -196,7 +196,7 @@ struct ThreadSafeFinalize { FinalizerDataType* data; Finalizer callback; }; -#endif +#endif // NAPI_VERSION > 3 && !defined(__wasm32__) template struct AccessorCallbackData { @@ -4302,7 +4302,7 @@ inline void AsyncWorker::OnWorkComplete(Napi::Env /*env*/, napi_status status) { } } -#if (NAPI_VERSION > 3) +#if (NAPI_VERSION > 3 && !defined(__wasm32__)) //////////////////////////////////////////////////////////////////////////////// // ThreadSafeFunction class //////////////////////////////////////////////////////////////////////////////// @@ -4969,7 +4969,7 @@ template inline void AsyncProgressQueueWorker::ExecutionProgress::Send(const T* data, size_t count) const { _worker->SendProgress_(data, count); } -#endif +#endif // NAPI_VERSION > 3 && !defined(__wasm32__) //////////////////////////////////////////////////////////////////////////////// // Memory Management class diff --git a/napi.h b/napi.h index de4d82f36..6c80efc26 100644 --- a/napi.h +++ b/napi.h @@ -2042,7 +2042,7 @@ namespace Napi { bool _suppress_destruct; }; - #if (NAPI_VERSION > 3) + #if (NAPI_VERSION > 3 && !defined(__wasm32__)) class ThreadSafeFunction { public: // This API may only be called from the main thread. @@ -2405,7 +2405,7 @@ namespace Napi { void Signal() const; void SendProgress_(const T* data, size_t count); }; - #endif + #endif // NAPI_VERSION > 3 && !defined(__wasm32__) // Memory management. class MemoryManagement {