Skip to content

Commit 23d8f73

Browse files
committed
quickjs: set default filename to 'code' for Eval()
1 parent 9e24121 commit 23d8f73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quickjs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ func (c Context) Atom(v string) Atom {
195195
return atom
196196
}
197197

198-
func (c Context) Eval(code string) (Value, error) { return c.EvalFile(code, "") }
198+
func (c Context) Eval(code string) (Value, error) { return c.EvalFile(code, "code") }
199199

200200
func (c Context) EvalFile(code, filename string) (Value, error) {
201201
codePtr := C.CString(code)

0 commit comments

Comments
 (0)