yaml: use standard base64 encoder
Let's drop yaml/b64 in favor of the base64 encoder used everywhere else in the Tarantool source code. yaml/b64 is also used by serialize_lua to print MP_BIN values. Let's print MP_BIN values as MP_STR there. This doesn't have any user-visible changes because since commit 890a821c ("yaml: don't encode unprintable strings as binary blobs") luaL_tofield never creates MP_BIN values. However, when we introduce the varbinary type to Lua, we will use the MP_BIN value type for it, and printing it in the Lua format as a string with unprintable characters escaped is going to be less confusing than encoding it in base64 without any tags or markers. While we're at it, let's use the luaL_field.sval.data in the encoders instead of extracting the string from the Lua stack again. Needed for #1629 NO_DOC=refactoring NO_TEST=refactoring NO_CHANGELOG=refactoring
Showing
- src/CMakeLists.txt 0 additions, 1 deletionsrc/CMakeLists.txt
- src/box/lua/serialize_lua.c 2 additions, 8 deletionssrc/box/lua/serialize_lua.c
- third_party/lua-yaml/b64.c 0 additions, 94 deletionsthird_party/lua-yaml/b64.c
- third_party/lua-yaml/b64.h 0 additions, 4 deletionsthird_party/lua-yaml/b64.h
- third_party/lua-yaml/lyaml.cc 1 addition, 11 deletionsthird_party/lua-yaml/lyaml.cc
Loading
Please register or sign in to comment