aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/encoding/gob
AgeCommit message (Collapse)Author
2013-11-18[release-branch.go1.2] encoding/gob: do not use MarshalText, UnmarshalTextAndrew Gerrand
««« CL 22770044 / 23fc3139589c encoding/gob: do not use MarshalText, UnmarshalText This seems to be the best of a long list of bad ways to fix this issue. Fixes #6760. R=r CC=golang-dev https://golang.org/cl/22770044 »»» R=golang-dev CC=golang-dev https://golang.org/cl/28110043
2013-11-18[release-branch.go1.2] encoding/gob: expose encode/decode exampleAndrew Gerrand
««« CL 26220045 / d76ade89413f encoding/gob: expose encode/decode example R=golang-dev, r CC=golang-dev https://golang.org/cl/26220045 »»» R=golang-dev CC=golang-dev https://golang.org/cl/25380044
2013-10-08encoding/gob: add examplesRob Pike
Also tweak the package document, putting in section headings and adding a sentence about intended use. Fixes #4925. R=golang-dev, iant, adg, ugorji CC=golang-dev https://golang.org/cl/14519044
2013-09-30undo CL 14154043 / 3e485428767eCarl Shapiro
««« original CL description encoding/gob: do not hide pointer argument for the garbage collector R=golang-dev, r CC=golang-dev https://golang.org/cl/14154043 »»» R=golang-dev CC=golang-dev https://golang.org/cl/14165043
2013-09-30encoding/gob: do not hide pointer argument for the garbage collectorCarl Shapiro
R=golang-dev, r CC=golang-dev https://golang.org/cl/14154043
2013-09-27all: fix some mistakes found by go tool vet .Rob Pike
R=golang-dev, iant, adg CC=golang-dev https://golang.org/cl/14000043
2013-09-16encoding/gob: ignore chan and func fields of structuresRob Pike
Previously, fields of type chan or func caused an error. Now we just treat them like unexported fields and ignore them. This makes it easier to guarantee long-term compatibilty since a substructure from another package cannot break gob encoding by adding a func or chan field. Fixes #6071 R=golang-dev, rsc CC=golang-dev https://golang.org/cl/13693043
2013-08-21all: protect alloc count tests by -testing.shortRob Pike
Update #5000 Should reduce the flakiness a little. Malloc counting is important to general testing but not to the build dashboard, which uses -short. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/12866047
2013-08-14encoding/gob: support new generic interfaces in package encodingRuss Cox
R=r CC=golang-dev https://golang.org/cl/12681044
2013-07-23all: be more idiomatic when documenting boolean return values.Rob Pike
Phrases like "returns whether or not the image is opaque" could be describing what the function does (it always returns, regardless of the opacity) or what it returns (a boolean indicating the opacity). Even when the "or not" is missing, the phrasing is bizarre. Go with "reports whether", which is still clunky but at least makes it clear we're talking about the return value. These were edited by hand. A few were cleaned up in other ways. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/11699043
2013-06-20all: excise some warts found by vet -shadowRob Pike
These are not erroneous, just poor or confusing. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/10448043
2013-06-04encoding/gob: consistently use unsafe.Pointer for pointer valuesIan Lance Taylor
Fixes #5621. R=golang-dev, cshapiro, r, fullung CC=golang-dev https://golang.org/cl/9988043
2013-03-22build: remove dead codeRuss Cox
R=golang-dev, r CC=golang-dev https://golang.org/cl/7877045
2013-03-22encoding/gob: delete dead code.Rob Pike
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/7834047
2013-03-06all: Skip AllocsPerRun tests if GOMAXPROCS>1.Albert Strasheim
Fixes #4974. R=rsc, bradfitz, r CC=golang-dev https://golang.org/cl/7545043
2013-02-28encoding/gob: fix copyrightRuss Cox
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7423046
2013-02-25all: fix some vet-found printf errorsRob Pike
R=golang-dev, iant CC=golang-dev https://golang.org/cl/7393059
2013-02-02testing: add AllocsPerRunKyle Lemons
This CL also replaces similar loops in other stdlib package tests with calls to AllocsPerRun. Fixes #4461. R=minux.ma, rsc CC=golang-dev https://golang.org/cl/7002055
2013-01-14encoding/gob: fix broken test (fix build)Alex Brainman
R=golang-dev, kevlar CC=adg, golang-dev https://golang.org/cl/7093056
2013-01-14encoding/gob: handle encoding of different indirects of GobEncoderKyle Lemons
Fixes #4647. R=r, golang-dev CC=golang-dev https://golang.org/cl/7085051
2012-12-22encoding/gob: document that structs only encode/decode exported fieldsRuss Cox
Fixes #4579. R=golang-dev, minux.ma CC=golang-dev https://golang.org/cl/7000051
2012-12-18fmt, encoding/gob: fix misuse of ReadShenghou Ma
reader.Read() can return both 0,nil and len(buf),err. To be safe, we use io.ReadFull instead of doing reader.Read directly. Fixes #3472. R=bradfitz, rsc, ality CC=golang-dev https://golang.org/cl/6285050
2012-12-01encoding/gob: Fix typo in doc.goLuit van Drongelen
Exactly how I find minute details like this is beyond me. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6842125
2012-12-01all: set GOMAXPROCS to 1 when counting mallocsShenghou Ma
also fix an annoying test that relies on $GOROOT be set. Fixes #3690. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6844086
2012-10-30gofmt: apply gofmt -w src miscRobert Griesemer
Remove trailing whitespace in comments. No other changes. R=r CC=golang-dev https://golang.org/cl/6815053
2012-10-09encoding/gob: add test case for issue 4214.Dmitriy Vyukov
See http://code.google.com/p/go/issues/detail?id=4214 R=golang-dev, r CC=golang-dev https://golang.org/cl/6619068
2012-10-09encoding/gob: fix data race in RegisterRob Pike
Fixes #4214. R=golang-dev, dsymonds, bradfitz CC=golang-dev https://golang.org/cl/6637047
2012-09-19encoding/gob: fix commentRobert Griesemer
Fixes #4100. R=adg, r, dave CC=golang-dev https://golang.org/cl/6535055
2012-07-25encoding/gob: test for type registration name.David Symonds
R=r CC=golang-dev https://golang.org/cl/6435044
2012-07-23encoding/gob: revert 6348067, which broke compatibilityRob Pike
Add commentary to explain better what's going on, but the code change is a simple one-line reversal to the previous form. R=rsc CC=golang-dev https://golang.org/cl/6428072
2012-07-13encoding/gob: disable fuzz tests unless command-line flag is setRob Pike
They can generate huge amounts of memory, causing failure on small machines. Also they can be very slow. So slow that one test was commented out! We uncomment it and use a flag. Fixes #3742. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6373044
2012-07-12encoding/gob: reduce decoder memoryRob Pike
Gob decoding reads a whole message into memory and then copies it into a bytes.Buffer. For large messages this wastes an entire copy of the message. In this CL, we use a staging buffer to avoid the large temporary. Update #2539 RSS drops to 775MB from 1GB. Active memory drops to 858317048 from 1027878136, essentially the size of one copy of the input file. R=dsymonds, nigeltao CC=golang-dev https://golang.org/cl/6392057
2012-07-12encoding/gob: fix check for short input in slice decodeRob Pike
R=golang-dev, dsymonds, r, nigeltao CC=golang-dev https://golang.org/cl/6374059
2012-07-03encoding/gob: fix bug in RegisterRob Pike
The old code added a star but did not indirect the reflect.Type. R=bradfitz CC=golang-dev https://golang.org/cl/6348067
2012-06-13encoding/gob: don't cache broken encoding engines.Rob Pike
Fixes a situation where a nested bad type would still permit the outer type to install a working engine, leading to inconsistent behavior. Fixes #3273. R=bsiegert, rsc CC=golang-dev https://golang.org/cl/6294067
2012-06-12encoding/gob: better handling of nil pointersRob Pike
- better message for top-level nil - nil inside interface yields error, not panic Fixes #3704. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/6304064
2012-06-09encoding/gob: fix doc typoBrad Fitzpatrick
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/6300078
2012-03-16doc: add Gobs of data articleFrancisco Souza
Originally published on The Go Programming Language Blog, March 24, 2011. http://blog.golang.org/2011/03/gobs-of-data.html R=adg CC=golang-dev https://golang.org/cl/5834043
2012-03-08all: gofmt -w -s src miscRobert Griesemer
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5781058
2012-03-08encoding/gob: fix memory corruptionDmitriy Vyukov
Fixes #3175. R=golang-dev, iant, rsc, r CC=golang-dev https://golang.org/cl/5758069
2012-03-01encoding/gob: more hardening for lengths of input strings.David Symonds
Fixes #3160. R=r CC=golang-dev https://golang.org/cl/5716046
2012-02-29gob: trivial print fixRobert Hencke
R=golang-dev, gri CC=golang-dev https://golang.org/cl/5707062
2012-02-28encoding/gob: fix "// +build" comment for debug.goShenghou Ma
R=golang-dev, rsc, adg, r, r CC=golang-dev https://golang.org/cl/5693060
2012-02-18encoding/gob: cache engine for user type, not base typeRob Pike
When we build the encode engine for a recursive type, we mustn't disregard the indirections or we can try to reuse an engine at the wrong indirection level. Fixes #3026. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5675087
2012-02-18encoding/gob: fix mutually recursive slices of structsRob Pike
Fix by setting the element type if we discover it's zero while building. We could have fixed this better with foresight by doing the id setting in a different sequence, but doing that now would break binary compatibility. Fixes #2995. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5675083
2012-02-17encoding/gob: catch internal error when it happensRob Pike
It was being skipped due to an oversight. Also adjust naming parameters for map type construction - makes debugging easier. Prelude to issue 3026. R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5674071
2012-02-14cmd/go: a raft of fixesRuss Cox
* add -work option to save temporary files (Fixes issue 2980) * fix go test -i to work with cgo packages (Fixes issue 2936) * do not overwrite/remove empty directories or non-object files during build (Fixes issue 2829) * remove package main vs package non-main heuristic: a directory must contain only one package (Fixes issue 2864) * to make last item workable, ignore +build tags for files named on command line: go build x.go builds x.go even if it says // +build ignore. * add // +build ignore tags to helper programs R=golang-dev, r, r CC=golang-dev https://golang.org/cl/5674043
2012-02-12runtime: delete Type and implementations (use reflect instead)Russ Cox
unsafe: delete Typeof, Reflect, Unreflect, New, NewArray Part of issue 2955 and issue 2968. R=golang-dev, r CC=golang-dev https://golang.org/cl/5650069
2012-02-07encoding/gob: document CommonTypeRob Pike
Also bring the names in doc.go in line with the source. More radical resolutions are possible but require substantial internal changes for very little benefit. Fixing it this way lets us keep the embedding, which has a huge simplifying effect, and guarantees binary compatibility. Fixes #2848. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5644045
2012-02-06doc: remove overuse of simplyRuss Cox
Specifically, remove simply where it is claiming that the code or the action to be carried out is simple, since the reader might disagree. R=golang-dev, bradfitz, gri CC=golang-dev https://golang.org/cl/5637048