Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for encIndir (0.08 sec)

  1. src/encoding/gob/encode.go

    func gobEncodeOpFor(ut *userTypeInfo) (*encOp, int) {
    	rt := ut.user
    	if ut.encIndir == -1 {
    		rt = reflect.PointerTo(rt)
    	} else if ut.encIndir > 0 {
    		for i := int8(0); i < ut.encIndir; i++ {
    			rt = rt.Elem()
    		}
    	}
    	var op encOp
    	op = func(i *encInstr, state *encoderState, v reflect.Value) {
    		if ut.encIndir == -1 {
    			// Need to climb up one level to turn value into pointer.
    			if !v.CanAddr() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 19K bytes
    - Viewed (0)
  2. src/encoding/gob/type.go

    			slowpoke = slowpoke.Elem()
    		}
    		ut.indir++
    	}
    
    	if ok, indir := implementsInterface(ut.user, gobEncoderInterfaceType); ok {
    		ut.externalEnc, ut.encIndir = xGob, indir
    	} else if ok, indir := implementsInterface(ut.user, binaryMarshalerInterfaceType); ok {
    		ut.externalEnc, ut.encIndir = xBinary, indir
    	}
    
    	// NOTE(rsc): Would like to allow MarshalText here, but results in incompatibility
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 27.2K bytes
    - Viewed (0)
Back to top