(p *Ptr)
| 499 | } |
| 500 | |
| 501 | func (d *decodeGen) gPtr(p *Ptr) { |
| 502 | if !d.p.ok() { |
| 503 | return |
| 504 | } |
| 505 | d.p.print("\nif dc.IsNil() {") |
| 506 | d.p.print("\nerr = dc.ReadNil()") |
| 507 | d.p.wrapErrCheck(d.ctx.ArgsStr()) |
| 508 | d.p.printf("\n%s = nil\n} else {", p.Varname()) |
| 509 | d.p.initPtr(p) |
| 510 | if p.typeParams.TypeParams != "" { |
| 511 | tp := p.typeParams |
| 512 | tp.isPtr = true |
| 513 | p.Value.SetTypeParams(tp) |
| 514 | } |
| 515 | if be, ok := p.Value.(*BaseElem); ok { |
| 516 | be.parentIsPtr = true |
| 517 | defer func() { be.parentIsPtr = false }() |
| 518 | } |
| 519 | next(d, p.Value) |
| 520 | d.p.closeblock() |
| 521 | } |
nothing calls this directly
no test coverage detected