aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/abi/numbers.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2016-04-07 17:39:22 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2016-04-20 22:43:57 +0800
commit5127ec10cb84a615f4d5b314e4c3c102efefe4c9 (patch)
tree46d8098b82b00f329c45abc9d520f8230a0c5e5f /accounts/abi/numbers.go
parent18580e152c1a2480b6245ebba4c62c202ed20ac6 (diff)
downloadgo-tangerine-5127ec10cb84a615f4d5b314e4c3c102efefe4c9.tar.gz
go-tangerine-5127ec10cb84a615f4d5b314e4c3c102efefe4c9.tar.zst
go-tangerine-5127ec10cb84a615f4d5b314e4c3c102efefe4c9.zip
accouns/abi: refactored ABI package
Refactored the abi package parsing and type handling. Relying mostly on package reflect as opposed to most of our own type reflection. Our own type reflection is still used however for cases such as Bytes and FixedBytes (abi: bytes•). This also inclused several fixes for slice handling of arbitrary and fixed size for all supported types. This also further removes implicit type casting such as assigning, for example `[2]T{} = []T{1}` will fail, however `[2]T{} == []T{1, 2}` (notice assigning *slice* to fixed size *array*). Assigning arrays to slices will always succeed if they are of the same element type. Incidentally also fixes #2379
Diffstat (limited to 'accounts/abi/numbers.go')
-rw-r--r--accounts/abi/numbers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/accounts/abi/numbers.go b/accounts/abi/numbers.go
index 084701de5..5a31cf2b5 100644
--- a/accounts/abi/numbers.go
+++ b/accounts/abi/numbers.go
@@ -24,8 +24,8 @@ import (
)
var (
- big_t = reflect.TypeOf(&big.Int{})
- ubig_t = reflect.TypeOf(&big.Int{})
+ big_t = reflect.TypeOf(big.Int{})
+ ubig_t = reflect.TypeOf(big.Int{})
byte_t = reflect.TypeOf(byte(0))
byte_ts = reflect.TypeOf([]byte(nil))
uint_t = reflect.TypeOf(uint(0))