diff --git a/Android/MMKV/build.gradle b/Android/MMKV/build.gradle index 8411b9f5..6206b3c1 100644 --- a/Android/MMKV/build.gradle +++ b/Android/MMKV/build.gradle @@ -1,7 +1,7 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { - ext.kotlin_version = '1.4.10' + ext.kotlin_version = '1.4.21' repositories { google() diff --git a/POSIX/golang/mmkv.go b/POSIX/golang/mmkv.go index 4f34e852..29ec76b8 100644 --- a/POSIX/golang/mmkv.go +++ b/POSIX/golang/mmkv.go @@ -73,6 +73,16 @@ type MMBuffer struct { length int } +// the address of underlying memory +func (buffer MMBuffer) Pointer() uintptr { + return buffer.ptr +} + +// the size of underlying memory +func (buffer MMBuffer) Length() int { + return buffer.length +} + // get byte slice view of underlying memory // the slice is valid as long as MMBuffer.Destroy() not called func (buffer MMBuffer) ByteSliceView() []byte {