Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(526)

Issue 140050044: code review 140050044: runtime: translate env*.c to Go (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by rsc
Modified:
10 years, 6 months ago
Reviewers:
r, 0intro
CC:
golang-codereviews, r, iant, khr
Visibility:
Public.

Description

runtime: translate env*.c to Go In an earlier CL I wrote a separate Go-only version, but that broke Plan 9, because the Go-only version assumed a non-Plan 9 system. Translate the real ones instead.

Patch Set 1 #

Patch Set 2 : diff -r 7786bd1553ab00632e8ea85a78d640eb19c9d490 https://code.google.com/p/go/ #

Patch Set 3 : diff -r 7786bd1553ab00632e8ea85a78d640eb19c9d490 https://code.google.com/p/go/ #

Patch Set 4 : diff -r 46b3648069191187feb99a401317f02ea45f4420 https://code.google.com/p/go/ #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+95 lines, -98 lines) Patch
M src/pkg/runtime/cgo/setenv.c View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/env_plan9.go View 1 1 chunk +49 lines, -33 lines 3 comments Download
M src/pkg/runtime/env_posix.go View 1 2 1 chunk +35 lines, -47 lines 0 comments Download
M src/pkg/runtime/extern.go View 1 1 chunk +0 lines, -14 lines 0 comments Download
M src/pkg/runtime/stubs.go View 1 2 3 3 chunks +6 lines, -2 lines 0 comments Download
M src/pkg/runtime/sys_plan9_amd64.s View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/thunk.s View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 6
rsc
Hello golang-codereviews@googlegroups.com (cc: 0intro, iant, khr, r), I'd like you to review this change to ...
10 years, 6 months ago (2014-08-30 18:10:37 UTC) #1
r
LGTM
10 years, 6 months ago (2014-08-30 18:23:41 UTC) #2
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=0e9f269a9c70 *** runtime: translate env*.c to Go In an earlier CL I ...
10 years, 6 months ago (2014-08-30 18:53:45 UTC) #3
0intro
Thanks. I was working on a different approach, but this one is definitely better. https://codereview.appspot.com/140050044/diff/60001/src/pkg/runtime/env_plan9.go ...
10 years, 6 months ago (2014-08-30 19:00:34 UTC) #4
0intro
https://codereview.appspot.com/140050044/diff/60001/src/pkg/runtime/env_plan9.go File src/pkg/runtime/env_plan9.go (right): https://codereview.appspot.com/140050044/diff/60001/src/pkg/runtime/env_plan9.go#newcode44 src/pkg/runtime/env_plan9.go:44: p = gomallocgc(uintptr(n+1), nil, 0) Shouldn't it be flagNoScan?
10 years, 6 months ago (2014-08-30 19:16:51 UTC) #5
0intro
10 years, 6 months ago (2014-08-30 21:21:32 UTC) #6
Message was sent while issue was closed.
LGTM with the changes.

I've sent CL 137030043 with the proposed changes.

https://codereview.appspot.com/140050044/diff/60001/src/pkg/runtime/env_plan9.go
File src/pkg/runtime/env_plan9.go (right):

https://codereview.appspot.com/140050044/diff/60001/src/pkg/runtime/env_plan9...
src/pkg/runtime/env_plan9.go:33: n := seek(fd, 0, 2)
Environment strings are usually null-terminated, so we really want -1 here.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b