github.com/trim21/go-phpserialize@v0.0.22-0.20240301204449-2fca0319b3f0/internal/decoder/type.go (about)

     1  package decoder
     2  
     3  import (
     4  	"reflect"
     5  	"unsafe"
     6  )
     7  
     8  type Decoder interface {
     9  	Decode(ctx *RuntimeContext, cursor, depth int64, p unsafe.Pointer) (int64, error)
    10  }
    11  
    12  const (
    13  	nul                   = '\000'
    14  	maxDecodeNestingDepth = 10000
    15  )
    16  
    17  var (
    18  	unmarshalPHPType = reflect.TypeOf((*Unmarshaler)(nil)).Elem()
    19  )