- 04 Mar, 2011 10 commits
-
-
Rob Pike authored
These allow data items to control their own representation. For now, the implementation requires that the value passed to Encode and Decode must be exactly the type of the methods' receiver; it cannot be, for instance, T if the receiver is of type *T. This will be fixed in a later CL. R=rsc CC=golang-dev https://golang.org/cl/4235051
-
Brad Fitzpatrick authored
The tests require Perl, not commonly installed on Windows. R=rsc, brainman CC=golang-dev https://golang.org/cl/4239057
-
Russ Cox authored
(Shouldn't happen, but if it does, it's useful to be able to use printf to debug it.) R=r CC=golang-dev https://golang.org/cl/4250057
-
Rob Pike authored
This allows a data item that can marshal itself to be transmitted by its own encoding, enabling some types to be handled that cannot be normally, plus providing a way to use gobs on data with unexported fields. In this CL, the necessary methods are protected by leading _, so only package gob can use the facilities (in its tests, of course); this code is not ready for real use yet. I could be talked into enabling it for experimentation, though. The main drawback is that the methods must be implemented by the actual type passed through, not by an indirection from it. For instance, if *T implements GobEncoder, you must send a *T, not a T. This will be addressed in due course. Also there is improved commentary and a couple of unrelated minor bug fixes. R=rsc CC=golang-dev https://golang.org/cl/4243056
-
Brad Fitzpatrick authored
http.Transport looks nicer, and ServerTransport doesn't make much sense anyway. R=rsc CC=golang-dev https://golang.org/cl/4239056
-
Brad Fitzpatrick authored
R=rsc, adg, jnw, bradfitzwork CC=golang-dev https://golang.org/cl/4247048
-
Andrew Gerrand authored
R=rsc CC=golang-dev https://golang.org/cl/4264043
-
Andrew Gerrand authored
R=r, fw, gri, r2, yiyus CC=golang-dev https://golang.org/cl/4248051
-
Andrew Gerrand authored
R=r, rsc, gri CC=golang-dev https://golang.org/cl/4257049
-
Robert Griesemer authored
R=r, r2 CC=golang-dev https://golang.org/cl/4252053
-
- 03 Mar, 2011 14 commits
-
-
Robert Griesemer authored
R=rsc, iant, r, r2 CC=golang-dev https://golang.org/cl/4256050
-
Brad Fitzpatrick authored
R=golang-dev, rsc, bradfitzwork CC=golang-dev https://golang.org/cl/4259048
-
Brad Fitzpatrick authored
Currently all http handlers reply to HTTP/1.1 requests with chunked responses. This patch allows handlers to opt-out of that behavior by pre-declaring their Content-Length (which is then enforced) and unsetting their Transfer-Encoding or setting it to the "identity" encoding. R=rsc, bradfitzwork CC=golang-dev https://golang.org/cl/4245058
-
Russ Cox authored
It's a little confusing that os.TempDir and ioutil.TempDir have different meanings. I don't know what to change the names to, if anything. At least they also have different signatures. R=golang-dev, bradfitzgo, r, gri CC=golang-dev https://golang.org/cl/4247051
-
Roger Peppe authored
R=r, rh, gri, rsc CC=golang-dev https://golang.org/cl/4237055
-
Roger Peppe authored
Detect when scan is being called recursively and re-use the same scan state. On my machine, for a recursion-heavy benchmark, this results in 44x speed up. This does impose a 4% penalty on the non-recursive case, which can be removed by heap-allocating the saved state, at 40% performance penalty on the recursive case. Either way is fine with me. R=r CC=golang-dev https://golang.org/cl/4253049
-
Russ Cox authored
This change makes it possible to take the address of a struct field or slice element in order to call a method that requires a pointer receiver. Existing code that uses the Value.Addr method will have to change (as gob does in this CL) to call UnsafeAddr instead. R=r, rog CC=golang-dev https://golang.org/cl/4239052
-
Russ Cox authored
R=ken2 CC=golang-dev https://golang.org/cl/4245055
-
Russ Cox authored
TBR=r CC=golang-dev https://golang.org/cl/4257054
-
Adam Langley authored
This borrows a trick from the bzip2 source and effects a decent speed up when decompressing highly compressed sources. Rather than unshuffle the BTW block when performing the IBTW, a linked-list is threaded through the array, in place. This improves cache hit rates. R=bradfitzgo, bradfitzwork, cw CC=golang-dev https://golang.org/cl/4247047
-
Nigel Tao authored
The test image was converted from doc/video-001.png using the convert command line tool (ImageMagick 6.5.7-8) at -quality 100. R=r, nigeltao_gnome CC=golang-dev https://golang.org/cl/4259047
-
Andrew Gerrand authored
Fixes #1574. R=rsc, r2 CC=golang-dev https://golang.org/cl/4240066
-
Andrew Gerrand authored
Also add -v for verbose logging. R=rsc, gri, r, r2 CC=golang-dev https://golang.org/cl/4172056
-
Rob Pike authored
Reflection is about Pointer, not uintptr. Also clarify that Reflect and Unreflect are indirect. R=rsc CC=golang-dev https://golang.org/cl/4254052
-
- 02 Mar, 2011 11 commits
-
-
Gustavo Niemeyer authored
This change removes the special case which existed for handling the initalization of the main package, so that other modules named 'main' get properly initialized when imported. Note that gotest of main packages will break in most cases without this. R=rsc CC=golang-dev https://golang.org/cl/4190050
-
Dave Cheney authored
R=rsc CC=golang-dev https://golang.org/cl/4188043
-
Yasuhiro Matsumoto authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4218042
-
Roger Peppe authored
It was possible to make package run arbitrary commands when installing if its filenames contained make metacharacters. R=rsc, niemeyer CC=golang-dev https://golang.org/cl/4248041
-
Dave Cheney authored
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4257045
-
Russ Cox authored
TBR=rog CC=golang-dev https://golang.org/cl/4259046
-
Dave Cheney authored
R=golang-dev, rsc CC=albert.strasheim, golang-dev https://golang.org/cl/4240055
-
Roger Peppe authored
Fixes #1572. Initially I tried changing things so all object files get put in _obj, but it's too much - everything needs changing. Perhaps some other time. R=rsc CC=golang-dev https://golang.org/cl/4237050
-
Roger Peppe authored
Add a new Read method to ScanState so that it satisfies the io.Reader interface; rename Getrune and Ungetrune to ReadRune and UnreadRune. Make sure ReadRune does not read past width restrictions; remove now-unnecessary Width method from ScanState. Also make the documentation a little clearer as to how ReadRune and UnreadRune are used. R=r, r2 CC=golang-dev https://golang.org/cl/4240056
-
Russ Cox authored
package main func main() { go func() { *(*int)(nil) = 0 }() select{} } panic: runtime error: invalid memory address or nil pointer dereference [signal 0xb code=0x1 addr=0x0 pc=0x1c96] runtime.panic+0xac /Users/rsc/g/go/src/pkg/runtime/proc.c:1083 runtime.panic(0x11bf0, 0xf8400011f0) runtime.panicstring+0xa3 /Users/rsc/g/go/src/pkg/runtime/runtime.c:116 runtime.panicstring(0x29a57, 0x0) runtime.sigpanic+0x144 /Users/rsc/g/go/src/pkg/runtime/darwin/thread.c:470 runtime.sigpanic() main._func_001+0x16 /Users/rsc/g/go/src/pkg/runtime/x.go:188 main._func_001() runtime.goexit /Users/rsc/g/go/src/pkg/runtime/proc.c:150 runtime.goexit() ----- goroutine created by ----- main.main+0x3d /Users/rsc/g/go/src/pkg/runtime/x.go:4 goroutine 1 [4]: runtime.gosched+0x77 /Users/rsc/g/go/src/pkg/runtime/proc.c:598 runtime.gosched() runtime.block+0x27 /Users/rsc/g/go/src/pkg/runtime/chan.c:680 runtime.block() main.main+0x44 /Users/rsc/g/go/src/pkg/runtime/x.go:5 main.main() runtime.mainstart+0xf /Users/rsc/g/go/src/pkg/runtime/amd64/asm.s:77 runtime.mainstart() runtime.goexit /Users/rsc/g/go/src/pkg/runtime/proc.c:150 runtime.goexit() ----- goroutine created by ----- _rt0_amd64+0x8e /Users/rsc/g/go/src/pkg/runtime/amd64/asm.s:64 Fixes #1563. R=r CC=golang-dev https://golang.org/cl/4243046
-
Brad Fitzpatrick authored
Fixes #1558 R=rsc, r, bradfitzwork CC=golang-dev https://golang.org/cl/4260042
-
- 01 Mar, 2011 5 commits
-
-
David Symonds authored
R=rsc CC=golang-dev https://golang.org/cl/4239050
-
Brad Fitzpatrick authored
This is again an intentionally minimal change. The plan is to keep Client's zero value be a usable client, with optional fields being added over time (e.g. cookie manager, redirect policy, auth) R=rsc CC=golang-dev https://golang.org/cl/4239044
-
Rob Pike authored
Computer people have an agglutinating streak that I like to resist. As a time of execution: run time. As an adjective: run-time. As a noun: run-time support/code/library. Signed, Mr. Pedant. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4252048
-
Rob Pike authored
(you'd never see it, but ouch.) Spotted by Florian Weimer. R=rsc CC=golang-dev https://golang.org/cl/4259044
-
Rob Pike authored
Fixes bug 1567. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4245048
-