Skip to content
Snippets Groups Projects
Commit feadfedd authored by Vladimir Davydov's avatar Vladimir Davydov Committed by dodokek
Browse files

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
parent 92730aae
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment