()
| 216 | } |
| 217 | |
| 218 | func (a *DatumAlloc) newString() *string { |
| 219 | buf := &a.stringAlloc |
| 220 | if len(*buf) == 0 { |
| 221 | allocSize := defaultDatumAllocSize |
| 222 | if a.typeAllocSizes.strings != 0 { |
| 223 | allocSize = a.typeAllocSizes.strings |
| 224 | } else if a.DefaultAllocSize != 0 { |
| 225 | allocSize = a.DefaultAllocSize |
| 226 | } |
| 227 | *buf = make([]string, allocSize) |
| 228 | } |
| 229 | r := &(*buf)[0] |
| 230 | *buf = (*buf)[1:] |
| 231 | return r |
| 232 | } |
| 233 | |
| 234 | // NewDString allocates a DString. |
| 235 | func (a *DatumAlloc) NewDString(v DString) *DString { |
no outgoing calls
no test coverage detected