Skip to content

Update exported func name to match exported name #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Sources/_CJavaScriptKit/_CJavaScriptKit.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ void _call_host_function_impl(const JavaScriptHostFuncRef host_func_ref,
const JavaScriptObjectRef callback_func);

__attribute__((export_name("swjs_call_host_function")))
void _call_host_function(const JavaScriptHostFuncRef host_func_ref,
const RawJSValue *argv, const int argc,
const JavaScriptObjectRef callback_func) {
void swjs_call_host_function(const JavaScriptHostFuncRef host_func_ref,
const RawJSValue *argv, const int argc,
const JavaScriptObjectRef callback_func) {
_call_host_function_impl(host_func_ref, argv, argc, callback_func);
}

__attribute__((export_name("swjs_prepare_host_function_call")))
void *_prepare_host_function_call(const int argc) {
void *swjs_prepare_host_function_call(const int argc) {
return malloc(argc * sizeof(RawJSValue));
}

__attribute__((export_name("swjs_cleanup_host_function_call")))
void _cleanup_host_function_call(void *argv_buffer) {
void swjs_cleanup_host_function_call(void *argv_buffer) {
free(argv_buffer);
}

/// The compatibility runtime library version.
/// Notes: If you change any interface of runtime library, please increment
/// this and `SwiftRuntime.version` in `./Runtime/src/index.ts`.
__attribute__((export_name("swjs_library_version")))
int _library_version() {
int swjs_library_version() {
return 701;
}

Expand Down