(i []int)
| 724 | } |
| 725 | |
| 726 | func NewStaticIntArray(i []int) Static { |
| 727 | if i == nil { |
| 728 | return Static{Type: TypeIntArray} |
| 729 | } |
| 730 | if len(i) == 0 { |
| 731 | return Static{Type: TypeIntArray, valBytes: []byte{}} |
| 732 | } |
| 733 | |
| 734 | numBytes := uintptr(len(i)) * unsafe.Sizeof(i[0]) |
| 735 | return Static{ |
| 736 | Type: TypeIntArray, |
| 737 | valBytes: unsafe.Slice((*byte)(unsafe.Pointer(&i[0])), numBytes), |
| 738 | } |
| 739 | } |
| 740 | |
| 741 | func NewStaticFloatArray(f []float64) Static { |
| 742 | if f == nil { |
no outgoing calls