| 152 | } |
| 153 | |
| 154 | func (p *ExampleToSnakeCase) BLength() int { |
| 155 | if p == nil { |
| 156 | return 1 |
| 157 | } |
| 158 | off := 0 |
| 159 | |
| 160 | // p.Msg ID:1 thrift.STRING |
| 161 | if p.Msg != nil { |
| 162 | off += 3 |
| 163 | off += 4 + len(*p.Msg) |
| 164 | } |
| 165 | |
| 166 | // p.ReqList ID:2 thrift.LIST |
| 167 | off += 3 |
| 168 | off += 5 |
| 169 | for _, v := range p.ReqList { |
| 170 | off += 4 + len(v) |
| 171 | } |
| 172 | |
| 173 | // p.InnerBase ID:3 thrift.I32 |
| 174 | off += 3 |
| 175 | off += 4 |
| 176 | |
| 177 | // p.Base ID:255 thrift.STRUCT |
| 178 | off += 3 |
| 179 | off += p.Base.BLength() |
| 180 | return off + 1 |
| 181 | } |
| 182 | |
| 183 | func (p *ExampleToSnakeCase) FastWrite(b []byte) int { return p.FastWriteNocopy(b, nil) } |
| 184 | |