Added new state object change echanism

This commit is contained in:
obscuren
2014-04-26 01:47:55 +02:00
parent f3818478e2
commit 0f93da400a
4 changed files with 69 additions and 44 deletions

View File

@ -20,7 +20,12 @@ func (val *Value) String() string {
}
func NewValue(val interface{}) *Value {
return &Value{Val: val}
t := val
if v, ok := val.(*Value); ok {
t = v.Val
}
return &Value{Val: t}
}
func (val *Value) Type() reflect.Kind {