codec_unsafe.go 518 B

123456789101112131415161718
  1. // Copyright 2019 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. //go:build !purego && !appengine
  5. // +build !purego,!appengine
  6. package impl
  7. // When using unsafe pointers, we can just treat enum values as int32s.
  8. var (
  9. coderEnumNoZero = coderInt32NoZero
  10. coderEnum = coderInt32
  11. coderEnumPtr = coderInt32Ptr
  12. coderEnumSlice = coderInt32Slice
  13. coderEnumPackedSlice = coderInt32PackedSlice
  14. )