Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
a4df525a
Commit
a4df525a
authored
Mar 26, 2011
by
Robert Hencke
Committed by
Rob Pike
Mar 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gob: trivial cleanup
R=golang-dev, r CC=golang-dev
https://golang.org/cl/4279074
parent
2795b131
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
type.go
src/pkg/gob/type.go
+3
-3
No files found.
src/pkg/gob/type.go
View file @
a4df525a
...
...
@@ -407,7 +407,7 @@ func (s *structType) string() string { return s.safeString(make(map[typeId]bool)
func
newStructType
(
name
string
)
*
structType
{
s
:=
&
structType
{
CommonType
{
Name
:
name
},
nil
}
// For historical reasons we set the id here rather than init.
// Se the comment in newTypeObject for details.
// Se
e
the comment in newTypeObject for details.
setTypeId
(
s
)
return
s
}
...
...
@@ -545,7 +545,7 @@ func getBaseType(name string, rt reflect.Type) (gobType, os.Error) {
// getType returns the Gob type describing the given reflect.Type.
// Should be called only when handling GobEncoders/Decoders,
// which may be pointers. All other types are handled through the
//
base type, never a pointer.
// base type, never a pointer.
// typeLock must be held.
func
getType
(
name
string
,
ut
*
userTypeInfo
,
rt
reflect
.
Type
)
(
gobType
,
os
.
Error
)
{
typ
,
present
:=
types
[
rt
]
...
...
@@ -561,7 +561,7 @@ func getType(name string, ut *userTypeInfo, rt reflect.Type) (gobType, os.Error)
func
checkId
(
want
,
got
typeId
)
{
if
want
!=
got
{
fmt
.
Fprintf
(
os
.
Stderr
,
"checkId: %d should be %d
\n
"
,
int
(
want
),
int
(
go
t
))
fmt
.
Fprintf
(
os
.
Stderr
,
"checkId: %d should be %d
\n
"
,
int
(
got
),
int
(
wan
t
))
panic
(
"bootstrap type wrong id: "
+
got
.
name
()
+
" "
+
got
.
string
()
+
" not "
+
want
.
string
())
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment