-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf921c1
commit 214f135
Showing
3 changed files
with
40 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef EMNAPI_INCLUDE_COMMON_H_ | ||
#define EMNAPI_INCLUDE_COMMON_H_ | ||
|
||
#define NAPI_EXTERN __attribute__((visibility("default"))) \ | ||
__attribute__((__import_module__("env"))) | ||
|
||
#ifdef __cplusplus | ||
#define EXTERN_C_START extern "C" { | ||
#define EXTERN_C_END } | ||
#else | ||
#define EXTERN_C_START | ||
#define EXTERN_C_END | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef EMNAPI_INCLUDE_EMNAPI_H_ | ||
#define EMNAPI_INCLUDE_EMNAPI_H_ | ||
|
||
#include "js_native_api_types.h" | ||
#include "common.h" | ||
|
||
EXTERN_C_START | ||
|
||
NAPI_EXTERN | ||
napi_status emnapi_get_module_property(napi_env env, | ||
const char* utf8name, | ||
napi_value* result); | ||
|
||
NAPI_EXTERN | ||
napi_status emnapi_create_external_uint8array(napi_env env, | ||
void* external_data, | ||
size_t byte_length, | ||
napi_finalize finalize_cb, | ||
void* finalize_hint, | ||
napi_value* result); | ||
|
||
EXTERN_C_END | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters