Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
dcb9614d
Commit
dcb9614d
authored
Mar 20, 2015
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common: drop unused kind field from Value
This makes Value 24 bytes smaller on 64bit systems.
parent
f7d1d601
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
value.go
common/value.go
+1
-5
No files found.
common/value.go
View file @
dcb9614d
...
@@ -26,10 +26,7 @@ import (
...
@@ -26,10 +26,7 @@ import (
// Value is useful whenever you feel that Go's types limit your
// Value is useful whenever you feel that Go's types limit your
// ability to express yourself. In these situations, use Value and
// ability to express yourself. In these situations, use Value and
// forget about this strong typing nonsense.
// forget about this strong typing nonsense.
type
Value
struct
{
type
Value
struct
{
Val
interface
{}
}
Val
interface
{}
kind
reflect
.
Value
}
func
(
val
*
Value
)
String
()
string
{
func
(
val
*
Value
)
String
()
string
{
return
fmt
.
Sprintf
(
"%x"
,
val
.
Val
)
return
fmt
.
Sprintf
(
"%x"
,
val
.
Val
)
...
@@ -53,7 +50,6 @@ func (val *Value) IsNil() bool {
...
@@ -53,7 +50,6 @@ func (val *Value) IsNil() bool {
}
}
func
(
val
*
Value
)
Len
()
int
{
func
(
val
*
Value
)
Len
()
int
{
//return val.kind.Len()
if
data
,
ok
:=
val
.
Val
.
([]
interface
{});
ok
{
if
data
,
ok
:=
val
.
Val
.
([]
interface
{});
ok
{
return
len
(
data
)
return
len
(
data
)
}
}
...
...
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