codec_unsafe.go 485 B

1234567891011121314151617
  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. // +build !purego,!appengine
  5. package impl
  6. // When using unsafe pointers, we can just treat enum values as int32s.
  7. var (
  8. coderEnumNoZero = coderInt32NoZero
  9. coderEnum = coderInt32
  10. coderEnumPtr = coderInt32Ptr
  11. coderEnumSlice = coderInt32Slice
  12. coderEnumPackedSlice = coderInt32PackedSlice
  13. )