| 325 | } |
| 326 | |
| 327 | MMKV_EXPORT bool encodeBytes_v2(void *handle, const char *oKey, void *oValue, uint64_t length, uint32_t expiration) { |
| 328 | MMKV *kv = static_cast<MMKV *>(handle); |
| 329 | if (kv && oKey) { |
| 330 | auto key = string(oKey); |
| 331 | if (oValue) { |
| 332 | auto value = MMBuffer(oValue, static_cast<size_t>(length), MMBufferNoCopy); |
| 333 | return kv->set(value, key, expiration); |
| 334 | } else { |
| 335 | kv->removeValueForKey(key); |
| 336 | return true; |
| 337 | } |
| 338 | } |
| 339 | return false; |
| 340 | } |
| 341 | |
| 342 | MMKV_EXPORT void *decodeBytes(void *handle, const char *oKey, uint64_t *lengthPtr) { |
| 343 | MMKV *kv = static_cast<MMKV *>(handle); |
nothing calls this directly
no test coverage detected