Formatted C++ Files According to the clang-format file. (#33158)

This commit is contained in:
Harry Hopkinson 2022-03-09 21:28:54 +00:00 committed by GitHub
parent ebfcf89a0b
commit 86e746c36b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -1,2 +1 @@
extern "C"
void foo() { }
extern "C" void foo() {}

View file

@ -8,22 +8,26 @@ napi_value TestLoadLibrary(napi_env env, napi_callback_info info) {
napi_value argv;
napi_status status;
status = napi_get_cb_info(env, info, &argc, &argv, NULL, NULL);
if (status != napi_ok) napi_fatal_error(NULL, 0, NULL, 0);
if (status != napi_ok)
napi_fatal_error(NULL, 0, NULL, 0);
char lib_path[256];
status = napi_get_value_string_utf8(env, argv, lib_path, 256, NULL);
if (status != napi_ok) napi_fatal_error(NULL, 0, NULL, 0);
if (status != napi_ok)
napi_fatal_error(NULL, 0, NULL, 0);
uv_lib_t lib;
auto uv_status = uv_dlopen(lib_path, &lib);
if (uv_status == 0) {
napi_value result;
status = napi_get_boolean(env, true, &result);
if (status != napi_ok) napi_fatal_error(NULL, 0, NULL, 0);
if (status != napi_ok)
napi_fatal_error(NULL, 0, NULL, 0);
return result;
} else {
status = napi_throw_error(env, NULL, uv_dlerror(&lib));
if (status != napi_ok) napi_fatal_error(NULL, 0, NULL, 0);
if (status != napi_ok)
napi_fatal_error(NULL, 0, NULL, 0);
}
}