1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-26 20:28:49 +08:00

Handle Ptr properly in type_go_*

Though I'm not sure that &map..., or &[]..., makes sense.
This commit is contained in:
Robert Krimen
2013-05-30 19:17:57 -07:00
parent f745b98f2b
commit 64182c96bd
5 changed files with 45 additions and 24 deletions

View File

@@ -364,8 +364,9 @@ func (self *_runtime) toValue(value interface{}) Value {
// Nothing happens.
default:
{
value := reflect.Indirect(reflect.ValueOf(value))
switch value.Kind() {
value := reflect.ValueOf(value)
valueValue := reflect.Indirect(value)
switch valueValue.Kind() {
case reflect.Struct:
return toValue(self.newGoStructObject(value))
case reflect.Map: