From 72d48edfa381e4ee3b643c09da937af220f37db1 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Mon, 15 Mar 2021 22:25:54 +0900 Subject: [PATCH] Update exported func name to match exported name --- Sources/_CJavaScriptKit/_CJavaScriptKit.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/_CJavaScriptKit/_CJavaScriptKit.c b/Sources/_CJavaScriptKit/_CJavaScriptKit.c index dd0f40959..fd9e39cd8 100644 --- a/Sources/_CJavaScriptKit/_CJavaScriptKit.c +++ b/Sources/_CJavaScriptKit/_CJavaScriptKit.c @@ -8,19 +8,19 @@ 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); } @@ -28,7 +28,7 @@ void _cleanup_host_function_call(void *argv_buffer) { /// 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; }