Skip to content

Commit a4428c5

Browse files
evgen-povtkaralabe
authored andcommitted
mobile: added constructor for BigInts (#17828)
1 parent 55a4ff8 commit a4428c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mobile/big.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ func (bi *BigInt) SetString(x string, base int) {
8484
// BigInts represents a slice of big ints.
8585
type BigInts struct{ bigints []*big.Int }
8686

87+
// NewBigInts creates a slice of uninitialized big numbers.
88+
func NewBigInts(size int) *BigInts {
89+
return &BigInts{
90+
bigints: make([]*big.Int, size),
91+
}
92+
}
93+
8794
// Size returns the number of big ints in the slice.
8895
func (bi *BigInts) Size() int {
8996
return len(bi.bigints)

0 commit comments

Comments
 (0)