mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
new new & make
R=r OCL=22166 CL=22166
This commit is contained in:
parent
9662e7b2db
commit
5564504507
113 changed files with 363 additions and 364 deletions
|
|
@ -39,7 +39,7 @@ func (a *Decimal) String() string {
|
|||
n += -a.dp;
|
||||
}
|
||||
|
||||
buf := new([]byte, n);
|
||||
buf := make([]byte, n);
|
||||
w := 0;
|
||||
switch {
|
||||
case a.nd == 0:
|
||||
|
|
@ -120,7 +120,7 @@ func (a *Decimal) Assign(v uint64) {
|
|||
}
|
||||
|
||||
package func NewDecimal(i uint64) *Decimal {
|
||||
a := new(*Decimal);
|
||||
a := new(Decimal);
|
||||
a.Assign(i);
|
||||
return a;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue