forked from mirror/go-json
Add iface value to keepRefs
This commit is contained in:
parent
669f910303
commit
345da09ed3
|
@ -170,6 +170,7 @@ func (e *Encoder) runEscaped(ctx *encodeRuntimeContext, b []byte, codeSet *opcod
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
iface := (*interfaceHeader)(e.ptrToUnsafePtr(ptr))
|
iface := (*interfaceHeader)(e.ptrToUnsafePtr(ptr))
|
||||||
|
ctx.keepRefs = append(ctx.keepRefs, unsafe.Pointer(iface))
|
||||||
ctx.keepRefs = append(ctx.keepRefs, iface.ptr)
|
ctx.keepRefs = append(ctx.keepRefs, iface.ptr)
|
||||||
if iface.ptr == nil {
|
if iface.ptr == nil {
|
||||||
b = encodeNull(b)
|
b = encodeNull(b)
|
||||||
|
|
Loading…
Reference in New Issue