4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-28 17:19:24 +00:00

Update vendor d5/tengo

This commit is contained in:
Wim
2019-03-05 23:08:54 +01:00
parent e955a056e2
commit 325d62b41c
38 changed files with 684 additions and 4416 deletions

View File

@ -2,6 +2,8 @@ package objects
import (
"encoding/json"
"github.com/d5/tengo"
)
// to_json(v object) => bytes
@ -15,6 +17,10 @@ func builtinToJSON(args ...Object) (Object, error) {
return &Error{Value: &String{Value: err.Error()}}, nil
}
if len(res) > tengo.MaxBytesLen {
return nil, ErrBytesLimit
}
return &Bytes{Value: res}, nil
}