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

Issue 4131042: code review 4131042: scan: permit base prefixes 0nnn and 0xnn when scanning (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 1 month ago by r
Modified:
14 years, 1 month ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

scan: permit base prefixes 0nnn and 0xnn when scanning signed or unsigned integers using %v or the formatless scanner. That is, Sscan("0x11", &i) or Sscanf("0x11", "%v", &i) will now set i to 17. If a format other than %v is presented, the behavior is as before. Fixes issue 1469.

Patch Set 1 #

Patch Set 2 : diff -r f37c651d8774 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 3 : diff -r 8e19d9fd1e6f https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -14 lines) Patch
M src/pkg/fmt/doc.go View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/pkg/fmt/scan.go View 1 2 5 chunks +45 lines, -13 lines 0 comments Download
M src/pkg/fmt/scan_test.go View 2 chunks +13 lines, -1 line 0 comments Download

Messages

Total messages: 4
r
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 1 month ago (2011-02-03 23:25:38 UTC) #1
r
Hello rsc (cc: golang-dev@googlegroups.com), Please take another look.
14 years, 1 month ago (2011-02-03 23:27:40 UTC) #2
rsc
LGTM http://codereview.appspot.com/4131042/diff/3001/src/pkg/fmt/scan.go File src/pkg/fmt/scan.go (right): http://codereview.appspot.com/4131042/diff/3001/src/pkg/fmt/scan.go#newcode382 src/pkg/fmt/scan.go:382: func oneOf(ok string, rune int) bool { return ...
14 years, 1 month ago (2011-02-04 21:07:29 UTC) #3
r
14 years, 1 month ago (2011-02-04 21:14:41 UTC) #4
*** Submitted as http://code.google.com/p/go/source/detail?r=475e73445ae1 ***

scan: permit base prefixes 0nnn and 0xnn when scanning
signed or unsigned integers using %v or the formatless scanner.
That is, Sscan("0x11", &i) or Sscanf("0x11", "%v", &i) will now
set i to 17.   If a format other than %v is presented, the behavior
is as before.

Fixes issue 1469.

R=rsc
CC=golang-dev
http://codereview.appspot.com/4131042
Sign in to reply to this message.

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