Skip to content

Commit

Permalink
node-api: add __wasm32__ guards on async works
Browse files Browse the repository at this point in the history
PR-URL: #46633
Refs: #33597
Refs: nodejs/node-addon-api#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>
  • Loading branch information
legendecas authored and danielleadams committed Apr 5, 2023
1 parent 3b70e7a commit 331073a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/node_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 331073a

Please sign in to comment.