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
|
|
@ -71,7 +71,7 @@ const (
|
|||
)
|
||||
|
||||
export func SecondsToUTC(sec int64) *Time {
|
||||
t := new(*Time);
|
||||
t := new(Time);
|
||||
|
||||
// Split into time and day.
|
||||
day := sec/SecondsPerDay;
|
||||
|
|
@ -281,7 +281,7 @@ func AddString(buf []byte, bp int, s string) int {
|
|||
// Just enough of strftime to implement the date formats below.
|
||||
// Not exported.
|
||||
func Format(t *Time, fmt string) string {
|
||||
buf := new([]byte, 128);
|
||||
buf := make([]byte, 128);
|
||||
bp := 0;
|
||||
|
||||
for i := 0; i < len(fmt); i++ {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue