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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
legendecas authored and targos committed Mar 13, 2023
1 parent 4e9915e commit 58b1f33
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 58b1f33

Please sign in to comment.