node-api: add __wasm32__ guards on async works

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 <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Chengzhong Wu 2023-02-24 13:53:11 +08:00 committed by GitHub
parent 86362b7877
commit ff91fc1e9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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