Skip to content

Commit e74a133

Browse files
committed
Rename inject_host_t to InjectHostFunction
1 parent e8e8c5d commit e74a133

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

packages/react-native-node-api-modules/scripts/generate-weak-node-api-injector.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function generateSource(functions: FunctionDecl[]) {
2626
2727
namespace callstack::nodeapihost {
2828
29-
using node_api::internal::inject_host_t;
29+
using node_api::internal::InjectHostFunction;
3030
using node_api::internal::NodeApiHost;
3131
3232
void injectIntoWeakNodeApi() {
@@ -36,7 +36,7 @@ export function generateSource(functions: FunctionDecl[]) {
3636
abort();
3737
}
3838
39-
auto inject_host = (inject_host_t)dlsym(
39+
auto inject_host = (InjectHostFunction)dlsym(
4040
module, "_ZN8node_api8internal11inject_hostERKNS0_11NodeApiHostE");
4141
if (NULL == inject_host) {
4242
log_debug("NapiHost: Failed to find 'inject_host' function: %s", dlerror());

packages/react-native-node-api-modules/scripts/generate-weak-node-api.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ export function generateHeader(functions: FunctionDecl[]) {
2323
`${returnType} (*${name})(${argumentTypes.join(", ")});`
2424
),
2525
"};",
26-
"typedef void(*inject_host_t)(const NodeApiHost&);",
27-
"void inject_host(const NodeApiHost& host);",
28-
"} // namespace node_api::internal",
26+
"typedef void(*InjectHostFunction)(const NodeApiHost&);",
2927
].join("\n");
3028
}
3129

0 commit comments

Comments
 (0)