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
Showing
- extra/exports 2 additions, 1 deletionextra/exports
- src/box/index.cc 2 additions, 3 deletionssrc/box/index.cc
- src/box/tuple_convert.c 1 addition, 1 deletionsrc/box/tuple_convert.c
- src/box/xrow.c 1 addition, 1 deletionsrc/box/xrow.c
- src/lua/digest.lua 4 additions, 3 deletionssrc/lua/digest.lua
- test/unit/base64.c 3 additions, 2 deletionstest/unit/base64.c
- third_party/base64.c 21 additions, 2 deletionsthird_party/base64.c
- third_party/base64.h 25 additions, 22 deletionsthird_party/base64.h
Loading
Please register or sign in to comment