Skip to content

Commit

Permalink
core, refactor: refactor node api include files.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Dec 21, 2023
1 parent 9b4e5a4 commit dae8dc5
Show file tree
Hide file tree
Showing 11 changed files with 911 additions and 803 deletions.
601 changes: 0 additions & 601 deletions fibjs/include/addons/js_native_api.h

This file was deleted.

16 changes: 14 additions & 2 deletions fibjs/include/addons/js_native_api_internal.h
Expand Up @@ -4,9 +4,21 @@
#include <limits.h>
#include <uv/include/uv.h>

#ifndef NAPI_EXTERN
#ifdef _WIN32
#define NAPI_EXTERN __declspec(dllexport)
#elif defined(__wasm__)
#define NAPI_EXTERN \
__attribute__((visibility("default"))) \
__attribute__((__import_module__("napi")))
#else
#define NAPI_EXTERN __attribute__((visibility("default"))) __attribute__((used))
#endif
#endif

#define NAPI_EXPERIMENTAL
#include "js_native_api.h"
#include "node_api.h"
#include "node_api/js_native_api.h"
#include "node_api/node_api.h"
#include "node_api_internal.h"

#define CHECK_ENV(env) \
Expand Down
168 changes: 0 additions & 168 deletions fibjs/include/addons/js_native_api_types.h

This file was deleted.

0 comments on commit dae8dc5

Please sign in to comment.