diff options
author | David Robillard <d@drobilla.net> | 2023-05-05 09:43:57 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:08 -0500 |
commit | 4711fdf527f416faee8ff19e15f050d4b48dcfb2 (patch) | |
tree | 6b18712ec44cce5713ddef1a21aec5f12651d901 /src/base64.c | |
parent | 248a874d7425749d29cf900a1c3783c624ea8d8c (diff) | |
download | serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.tar.gz serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.tar.bz2 serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.zip |
[WIP] Generalize node construction API
Diffstat (limited to 'src/base64.c')
-rw-r--r-- | src/base64.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/base64.c b/src/base64.c deleted file mode 100644 index 50ec3981..00000000 --- a/src/base64.c +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2011-2020 David Robillard <d@drobilla.net> -// SPDX-License-Identifier: ISC - -#include "base64.h" - -#include "exess/exess.h" -#include "serd/string.h" - -#include <stdlib.h> - -void* -serd_base64_decode(const char* const str, const size_t len, size_t* const size) -{ - const size_t max_size = exess_base64_decoded_size(len); - - void* const buf = malloc(max_size); - const ExessVariableResult r = exess_read_base64(max_size, buf, str); - if (r.status) { - *size = 0; - free(buf); - return NULL; - } - - *size = r.write_count; - - return buf; -} |