diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-01-08 13:47:51 -0500 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-01-10 15:48:09 -0500 |
commit | 07f3b147f1619b234cad0fda3d7556c1f05e7f11 (patch) | |
tree | b50e4e5e7ddffc0010df82b0c09e6d25b336a7a0 /vendor/github.com/mailru/easyjson/jlexer/bytestostr.go | |
parent | 36d96c19f947aeac2675afe64a3b482e54f9e4c4 (diff) | |
download | podman-07f3b147f1619b234cad0fda3d7556c1f05e7f11.tar.gz podman-07f3b147f1619b234cad0fda3d7556c1f05e7f11.tar.bz2 podman-07f3b147f1619b234cad0fda3d7556c1f05e7f11.zip |
Remove easyjson in preparation for switch to jsoniter
The jsoniter library does not require code generation, which is a
massive advantage over easyjson (it's also about the same in
performance). Begin moving over to it by removing the existing
easyjson code.
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'vendor/github.com/mailru/easyjson/jlexer/bytestostr.go')
-rw-r--r-- | vendor/github.com/mailru/easyjson/jlexer/bytestostr.go | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go b/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go deleted file mode 100644 index ff7b27c5b..000000000 --- a/vendor/github.com/mailru/easyjson/jlexer/bytestostr.go +++ /dev/null @@ -1,24 +0,0 @@ -// This file will only be included to the build if neither -// easyjson_nounsafe nor appengine build tag is set. See README notes -// for more details. - -//+build !easyjson_nounsafe -//+build !appengine - -package jlexer - -import ( - "reflect" - "unsafe" -) - -// bytesToStr creates a string pointing at the slice to avoid copying. -// -// Warning: the string returned by the function should be used with care, as the whole input data -// chunk may be either blocked from being freed by GC because of a single string or the buffer.Data -// may be garbage-collected even when the string exists. -func bytesToStr(data []byte) string { - h := (*reflect.SliceHeader)(unsafe.Pointer(&data)) - shdr := reflect.StringHeader{Data: h.Data, Len: h.Len} - return *(*string)(unsafe.Pointer(&shdr)) -} |