aboutsummaryrefslogtreecommitdiffstats
path: root/ethereum/repl_darwin.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-21 01:28:48 +0800
committerobscuren <geffobscura@gmail.com>2014-05-21 01:28:48 +0800
commit563c035eb57a0507979a84f3dd22411be2a4cad1 (patch)
treeacfec3cebd471060008a8e6ab875d3125954e3a2 /ethereum/repl_darwin.go
parentde1dfae7170a946d255a9b4932e08f887d48947c (diff)
downloaddexon-563c035eb57a0507979a84f3dd22411be2a4cad1.tar.gz
dexon-563c035eb57a0507979a84f3dd22411be2a4cad1.tar.zst
dexon-563c035eb57a0507979a84f3dd22411be2a4cad1.zip
Refactored some of the functions
Diffstat (limited to 'ethereum/repl_darwin.go')
-rw-r--r--ethereum/repl_darwin.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/ethereum/repl_darwin.go b/ethereum/repl_darwin.go
index cf6e24e18..1b98c2150 100644
--- a/ethereum/repl_darwin.go
+++ b/ethereum/repl_darwin.go
@@ -8,7 +8,6 @@ package main
import "C"
import (
- "github.com/obscuren/otto"
"strings"
"unsafe"
)
@@ -87,7 +86,10 @@ L:
}
}
-func (self *JSRepl) PrintValue(value otto.Value) {
+func (self *JSRepl) PrintValue(v interface{}) {
method, _ := self.re.vm.Get("prettyPrint")
- method.Call(method, value)
+ v, err := self.re.vm.ToValue(v)
+ if err == nil {
+ method.Call(method, v)
+ }
}