github.com/vc42/parquet-go@v0.0.0-20240320194221-1a9adb5f23f5/value_go17.go (about)

     1  //go:build !go1.18
     2  
     3  package parquet
     4  
     5  import (
     6  	"reflect"
     7  	"unsafe"
     8  )
     9  
    10  func unsafePointer(v reflect.Value) unsafe.Pointer {
    11  	// This may not have been a safe conversion but there were no better way
    12  	// prior to Go 1.18 and the introduction of reflect.Value.UnsafePointer.
    13  	return unsafe.Pointer(v.Pointer())
    14  }