MCPcopy Create free account
hub / github.com/Tencent/MMKV / importFrom

Function importFrom

OpenHarmony/MMKV/src/main/cpp/native_bridge.cpp:1461–1474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1459}
1460
1461static napi_value importFrom(napi_env env, napi_callback_info info) {
1462 size_t argc = 2;
1463 napi_value args[2] = {nullptr};
1464 NAPI_CALL(napi_get_cb_info(env, info, &argc, args, nullptr, nullptr));
1465
1466 auto handle = NValueToUInt64(env, args[0]);
1467 auto srcHandle = NValueToUInt64(env, args[1]);
1468 MMKV *kv = reinterpret_cast<MMKV *>(handle);
1469 MMKV *kvSrc = reinterpret_cast<MMKV *>(srcHandle);
1470 if (kv && kvSrc) {
1471 return UInt64ToNValue(env, kv->importFrom(kvSrc));
1472 }
1473 return NAPIUndefined(env);
1474}
1475
1476static napi_value mmkvClose(napi_env env, napi_callback_info info) {
1477 size_t argc = 1;

Callers

nothing calls this directly

Calls 4

NValueToUInt64Function · 0.85
NAPIUndefinedFunction · 0.85
UInt64ToNValueFunction · 0.70
importFromMethod · 0.45

Tested by

no test coverage detected