From 331073a7aa97fcdbe5da6a2d38e4f2d9fdbe0eb3 Mon Sep 17 00:00:00 2001 From: Chengzhong Wu Date: Fri, 24 Feb 2023 13:53:11 +0800 Subject: [PATCH] node-api: add __wasm32__ guards on async works MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/46633 Refs: https://github.com/nodejs/node/pull/33597 Refs: https://github.com/nodejs/node-addon-api/pull/1283 Reviewed-By: Tobias Nießen Reviewed-By: Colin Ihrig Reviewed-By: Michael Dawson Reviewed-By: James M Snell --- src/node_api.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/node_api.h b/src/node_api.h index 2e3a816a6c5024..caf987dbd8dd8b 100644 --- a/src/node_api.h +++ b/src/node_api.h @@ -175,6 +175,7 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_get_buffer_info(napi_env env, void** data, size_t* length); +#ifndef __wasm32__ // Methods to manage simple async operations NAPI_EXTERN napi_status NAPI_CDECL napi_create_async_work(napi_env env, @@ -190,6 +191,7 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_queue_async_work(napi_env env, napi_async_work work); NAPI_EXTERN napi_status NAPI_CDECL napi_cancel_async_work(napi_env env, napi_async_work work); +#endif // __wasm32__ // version management NAPI_EXTERN napi_status NAPI_CDECL