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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user