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

base64: add function to caclculate buffer size for decoding

There's base64_bufsize for calculating the buffer size needed for
base64_encode but there's no such function for base64_decode - one's
supposed to pass a buffer > 3/4 of the input size. This is confusing.
Let's rename base64_bufsize to base64_encode_bufsize and introduce
base64_decode_bufsize.

While we're at it, move base64_encode_bufsize body from base64.h to
base64.c because otherwise the linker fails if this function, which is
currently declared as extern inline, is used in lyaml.cc.

Needed for #1629

NO_DOC=refactoring
NO_CHANGELOG=refactoring
parent a19d1b73
No related branches found
No related tags found
No related merge requests found
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